Page 1 of 1

Callback status reverts to LIVE after DB update to ACTIVE

PostPosted: Sun Nov 12, 2017 2:01 pm
by SPAMSAM
Hi,

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

Re: Callback status reverts to LIVE after DB update to ACTIV

PostPosted: Sun Nov 12, 2017 4:58 pm
by mflorell
Yes, that's how it's supposed to work. Once a scheduled callback has passed it's trigger time, the hopper process will always try to set ACTIVE ones to LIVE.

Re: Callback status reverts to LIVE after DB update to ACTIV

PostPosted: Mon Nov 13, 2017 3:09 pm
by SPAMSAM
OK cool. Will they get loaded with a higher priority than the other leads in the hopper?

Re: Callback status reverts to LIVE after DB update to ACTIV

PostPosted: Mon Nov 13, 2017 4:27 pm
by mflorell
Yes, Scheduled Callbacks always get loaded at a higher priority in the hopper than standard loaded leads.

Re: Callback status reverts to LIVE after DB update to ACTIV

PostPosted: Wed Nov 22, 2017 1:37 pm
by SPAMSAM
Thanks for the info mflorell. Do you know if there is a better way to get stale callbacks loaded back into the hopper again?

Client does not want to put them on a list and upload it again.

Re: Callback status reverts to LIVE after DB update to ACTIV

PostPosted: Wed Nov 22, 2017 1:47 pm
by blackbird2306
Maybe that's what you are looking for:
Reports --> Admin Utilities --> "Callbacks Transferral" Page or "Callbacks Bulk Move"

Re: Callback status reverts to LIVE after DB update to ACTIV

PostPosted: Mon Nov 27, 2017 3:32 pm
by SPAMSAM
Thanks blackbird. I gave it a try and it works. However the client wants it to to happen automatically by way of the SQL script above implemented as an event.

In production it works fine, as the callbacks get loaded back into the hopper with a priority of 50. Unfortunately they only stay in the hopper for about a minute or so. After that the 'normal' leads get loaded back into the hopper and client has to wait for the event to run again about an hour later.

To me it seems like the hopper reloads itself according to the normal system config every minute. I'm not sure if I cam correct. Is there a way to change the interval at which the hopper loads?

Re: Callback status reverts to LIVE after DB update to ACTIV

PostPosted: Mon Nov 27, 2017 4:06 pm
by mflorell
The hopper script will be loaded in the crontab on your system, so you can change how frequently it runs.