Old anyone callbacks not called due to reset hopper

All installation and configuration problems and questions

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

Old anyone callbacks not called due to reset hopper

Postby airflux » Fri Jun 23, 2017 5:07 am

Hi all.
I've found a lot of callsbacks LIVE not called in vicidial_callbacks table, on active list too (SELECT * FROM `vicidial_callbacks` WHERE status = 'LIVE' and lead_id not in (select lead_id from vicidial_hopper))

The process for callbacks is:
AST_VDhopper.pl looks for ACTIVE callbaks where callback_time < now and
1) change the status from ACTIVE to LIVE on vicidial_callbacks table
2) change the status from CBHOLD to CALLBK on vicidial_list
3) insert the lead in vicidial_hopper table

We usually use the "force reset hopper" option after important changes on campaigns, and this options execute the following query:
DELETE from vicidial_hopper where campaign_id='$campaign_id' and status IN('READY','QUEUE','DONE');
leaving callbacks on status LIVE, then no more callable because AST_VDhopper.pl search only for ACTIVE.

To avoid changes on AST_Vdhopper.pl I'll solve my problem adding a cron with the following script

Code: Select all
$sql1 = "SELECT lead_id
           FROM `vicidial_callbacks`
          WHERE status = 'LIVE' and lead_id not in (select lead_id from vicidial_hopper) ";

$rslt = mysql_to_mysqli($sql1, $link);

if (mysqli_num_rows($rslt) > 0) {

    while ($row = mysqli_fetch_array($rslt)) {
        $sql2 = "UPDATE vicidial_callbacks
                    SET
                        status = 'ACTIVE'           
                     WHERE
                        lead_id ={$row['lead_id']}";

        mysql_to_mysqli($sql2, $link);

        $sql3 = "UPDATE vicidial_list
                    SET
                        status = 'CBHOLD'
                    WHERE
                       lead_id ={$row['lead_id']}
                     AND status = 'CALLBK' ";

        mysql_to_mysqli($sql3, $link);
    }
}


but the best solution is to change the query that loads callbacks from
SELECT vicidial_callbacks.lead_id,recipient,campaign_id,vicidial_callbacks.list_id,gmt_offset_now,state,vicidial_callbacks.lead_status,vendor_lead_code FROM vicidial_callbacks,vicidial_list where callback_time <= '$now_date' and vicidial_callbacks.status='ACTIVE' and vicidial_callbacks.lead_id=vicidial_list.lead_id
in
SELECT vicidial_callbacks.lead_id,recipient,campaign_id,vicidial_callbacks.list_id,gmt_offset_now,state,vicidial_callbacks.lead_status,vendor_lead_code
FROM vicidial_callbacks,vicidial_list
where
((callback_time <= '$now_date' and vicidial_callbacks.status='ACTIVE') OR ((vicidial_callbacks.status='LIVE' AND lead_id not in (select lead_id from vicidial_hopper))))
and vicidial_callbacks.lead_id=vicidial_list.lead_id
or something like that.
Vicibox 7.0.2 - V. 2.12-551a Build 160427-1656 - svn 2353 – 3 Dell R610 (1 db+www - 4 sas raid 10, 2 dialers - 2 sas raid 1)
Vicibox 7.0.3 - V. 2.14-585a Build 170114-1356 - svn 2659 – 2 Dell R610 (1 db+www - 4 sas raid 10, 1 dialer - 2 sas raid 1)
airflux
 
Posts: 29
Joined: Fri Nov 07, 2014 12:39 pm

Re: Old anyone callbacks not called due to reset hopper

Postby mflorell » Fri Jun 23, 2017 5:54 am

Do you not have your CALLBK statuses set as dialable statuses in your campaign?
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Old anyone callbacks not called due to reset hopper

Postby airflux » Fri Jun 23, 2017 7:03 am

I removed CALLBK when I seen the procedure that AST_VDHopper.pl use to load them in hopper, to avoid then scenario where leads can be loaded 2 times, 1 by callbacks table, 1 by list table. But reading your question now I think that I've made a mistake :)
Vicibox 7.0.2 - V. 2.12-551a Build 160427-1656 - svn 2353 – 3 Dell R610 (1 db+www - 4 sas raid 10, 2 dialers - 2 sas raid 1)
Vicibox 7.0.3 - V. 2.14-585a Build 170114-1356 - svn 2659 – 2 Dell R610 (1 db+www - 4 sas raid 10, 1 dialer - 2 sas raid 1)
airflux
 
Posts: 29
Joined: Fri Nov 07, 2014 12:39 pm

Re: Old anyone callbacks not called due to reset hopper

Postby mflorell » Fri Jun 23, 2017 7:48 am

The hopper will not load the same lead into the hopper twice at the same time.
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Old anyone callbacks not called due to reset hopper

Postby airflux » Fri Jun 23, 2017 8:45 am

Ok.
Thank you
Vicibox 7.0.2 - V. 2.12-551a Build 160427-1656 - svn 2353 – 3 Dell R610 (1 db+www - 4 sas raid 10, 2 dialers - 2 sas raid 1)
Vicibox 7.0.3 - V. 2.14-585a Build 170114-1356 - svn 2659 – 2 Dell R610 (1 db+www - 4 sas raid 10, 1 dialer - 2 sas raid 1)
airflux
 
Posts: 29
Joined: Fri Nov 07, 2014 12:39 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 88 guests