I am trying to update callback statuses to 'ACTIVE' once a callback status has been on 'LIVE' for more than a week.
I run an update query to reset the statuses, which it does sortof successfully. However, a couple of minutes after the update query the statuses are reset back to 'LIVE'. It's the weirdest thing.
Is it possible a cronjob that could be resetting the status values to their original live state? Has anyone encountered something similar before?
Query follows below:
- Code: Select all
update vicidial_callbacks set status='ACTIVE', recipient='ANYONE', comments=case when comments like 'HAPPY HUNTING%' then comments else concat('HAPPY HUNTING! Callback was due on ', date_format(callback_time,'%Y-%m-%d - '),comments) end
WHERE callback_time < date_sub(curdate(), interval 7 day)
and status='LIVE'
and campaign_id in (select campaign_id from vicidial_campaigns where active='Y')
and lead_id not in (select lead_id from vicidial_hopper)
and lead_id not in (select lead_id from vicidial_auto_calls)
and lead_id not in (select lead_id from vicidial_log where vicidial_log.call_date > callback_time and vicidial_log.call_date > entry_time and vicidial_log.user<>'VDAD');
SYSTEM info:
VERSION: 2.14-627a
BUILD: 170828-2105
Asterisk: 11.25.1-vici