Callback status reverts to LIVE after DB update to ACTIVE

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Callback status reverts to LIVE after DB update to ACTIVE

Postby SPAMSAM » Sun Nov 12, 2017 2:01 pm

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
SPAMSAM
 
Posts: 32
Joined: Tue Jan 17, 2017 4:00 am

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

Postby mflorell » Sun Nov 12, 2017 4:58 pm

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.
mflorell
Site Admin
 
Posts: 17040
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

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

Postby SPAMSAM » Mon Nov 13, 2017 3:09 pm

OK cool. Will they get loaded with a higher priority than the other leads in the hopper?
SPAMSAM
 
Posts: 32
Joined: Tue Jan 17, 2017 4:00 am

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

Postby mflorell » Mon Nov 13, 2017 4:27 pm

Yes, Scheduled Callbacks always get loaded at a higher priority in the hopper than standard loaded leads.
mflorell
Site Admin
 
Posts: 17040
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

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

Postby SPAMSAM » Wed Nov 22, 2017 1:37 pm

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.
SPAMSAM
 
Posts: 32
Joined: Tue Jan 17, 2017 4:00 am

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

Postby blackbird2306 » Wed Nov 22, 2017 1:47 pm

Maybe that's what you are looking for:
Reports --> Admin Utilities --> "Callbacks Transferral" Page or "Callbacks Bulk Move"
Vicibox 6.0.2 from Vicibox_v.6.0.x86_64-6.0.2.iso | Vicidial 2.12-560a build: 160617-1427 | Asterisk 1.8.32.3
blackbird2306
 
Posts: 349
Joined: Mon Jun 23, 2014 5:31 pm

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

Postby SPAMSAM » Mon Nov 27, 2017 3:32 pm

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?
SPAMSAM
 
Posts: 32
Joined: Tue Jan 17, 2017 4:00 am

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

Postby mflorell » Mon Nov 27, 2017 4:06 pm

The hopper script will be loaded in the crontab on your system, so you can change how frequently it runs.
mflorell
Site Admin
 
Posts: 17040
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Support

Who is online

Users browsing this forum: khuff and 27 guests