Callbacks LIVE after reboot

Any and all non-support discussions

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

Callbacks LIVE after reboot

Postby guillecs » Thu Jan 24, 2013 7:36 am

Hello alls,
i'm wondering , how vicidial manage this scenario:

When there are some 'ANYONE' callbacks with 'LIVE' status that (normally) are into the hopper list,
an then the system is rebooted, when vicidial starts, the hopper list is deleted, the
status of that callbacks remains marked as 'LIVE' , but they never will be called ,
becouse AST_VDhopper.pl only fill the hopper list with callbacks when it change the status from ACTIVE to LIVE..

Can anyone tell me if this is correct .

Thanks, and sorry about my bad english.
1 Server: DB, WEB and TELEPHONY
vicibox 4.0.1 | VICIDIAL VERSION: 2.6-392a BUILD: 130102-1135 | From ViciBox.x86_64-4.0.1.iso
vicidial trunk revision 1915
Asterisk 1.4.44-vici on a x86_64
HP Proliant DL 380 G7 , 2 Xeon CPU E5620 @ 2.40GHz , 16 GB RAM
guillecs
 
Posts: 4
Joined: Thu Jan 24, 2013 7:19 am

Re: Callbacks LIVE after reboot

Postby williamconley » Thu Jan 24, 2013 4:41 pm

1) Welcome to the Party! 8-)

2) when you post, please post your entire configuration including (but not limited to) your installation method and vicidial version with build.

this IS a requirement for posting along with reading the stickies (at the top of each forum) and the manager's manual (available on EFLO.net, both free and paid versions)

You should also post: Asterisk version, telephony hardware (model number is helpful here), cluster information if you have one, and whether any other software is installed in the box. If your installation method is "from scratch" you must post your operating system and should also post the .iso version from which you installed your original operating system. If your installation is "Hosted" list the site name of the host.

If this is a "Cloud" or "Virtual" server, please note the technology involved along with the version of that techology (ie: VMware Server Version 2.0.2). If it is not, merely stating the Motherboard model # and CPU would be helpful.

Similar to This:

Vicibox X.X from .iso | Vicidial X.X.X-XXX Build XXXXXX-XXXX | Asterisk X.X.X | Single Server | No Digium/Sangoma Hardware | No Extra Software After Installation | Intel DG35EC | Core2Quad Q6600

3) Please test this (with the latest SVN, of course, to be sure you are up to date...). I've not had a complaint from a client on this topic, so perhaps you are mistaken. But certainly worth checking to see.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Callbacks LIVE after reboot

Postby guillecs » Fri Jan 25, 2013 4:27 am

Hello , I'm reading the code of the latest sources and older sources 2.4xxx,
and still havent found , the place where the system fill the hopper with these
callbacks (marked as LIVE before the system reboot) again, so I think
never ever will be called.

I want know if this callback treatment is a feature or a bug, or if there is
some place in the system that manage this 'losts after reboot live callbacks'

Thanks.
1 Server: DB, WEB and TELEPHONY
vicibox 4.0.1 | VICIDIAL VERSION: 2.6-392a BUILD: 130102-1135 | From ViciBox.x86_64-4.0.1.iso
vicidial trunk revision 1915
Asterisk 1.4.44-vici on a x86_64
HP Proliant DL 380 G7 , 2 Xeon CPU E5620 @ 2.40GHz , 16 GB RAM
guillecs
 
Posts: 4
Joined: Thu Jan 24, 2013 7:19 am

Re: Callbacks LIVE after reboot

Postby williamconley » Fri Jan 25, 2013 10:23 am

Please state specifically whether you have tested this and exactly what the result was ...

It may be necessary to put these entries in a special table and check against that table at reboot.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Callbacks LIVE after reboot

Postby guillecs » Mon Jan 28, 2013 7:03 am

Sorry, I don't know how explain the situation clearly:
I saw a lot of callbacks on the hopper , then i reboot the machine , I saw the same
hopper and the callbacks and they aren't there...., the rows in the vicidial_callbacks table
are still there, with status marked as 'LIVE' , the rows in vicidial_list table are still there
, with status marked as 'CALLBK' , but althougth the programed time is past, never went
another time on the hopper.
The callbacks are ONLY filled into the hopper, when are modified from ACTIVE to LIVE,
if the hopper is emptied, by a reboot b.e. , the callbacks who were deleted from hopper, never will be putted
on the hopper, becouse they are already marked as LIVE.

Below I paste the piece of the source (AST_VDhopper.pl) where the hopper is filled with the callbacks (anynone),
The callbacks,
....
$stmtA = "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;";
....
while ($sthArows > $cbc)
...
if ( ($cba > 0) && ($insert_auto_CB_to_hopper) ) {
$stmtA = "UPDATE vicidial_callbacks set status='LIVE' where lead_id IN($update_leads) and status NOT IN('INACTIVE','DEAD','ARCHIVE');";
....
foreach(@CA_lead_id) {
$stmtA = "UPDATE vicidial_list set status='$CA_status[$CAu]', called_since_last_reset='N' where lead_id='$CA_lead_id[$CAu]';";
(in older versions, status always is set to 'CALLBK' )
$stmtA = "INSERT INTO $vicidial_hopper SET lead_id='$CA_lead_id[$CAu]',campaign_id='$CA_campaign_id[$CAu]',list_id='$CA_list_id[$CAu]',gmt_offset_now='$CA_gmt_offset_now[$CAu]',user='',state='$CA_state[$CAu]',priority='50',source='C',vendor_lead_code='$CA_vendor_lead_code[$cba]';";
....
}

.....
}
....

May be, a solution is that when the machine starts , after the hopper is deleted, mark as ACTIVE
all the callbacks that are marked as LIVE (and also may be marked as CALLBK in the list).
Or before the hopper is deleted, by the booting process or the reload hopper action, mark as ACTIVE all
the callbacks that are into it and was previusly marked as LIVE.


Thanks.



....
1 Server: DB, WEB and TELEPHONY
vicibox 4.0.1 | VICIDIAL VERSION: 2.6-392a BUILD: 130102-1135 | From ViciBox.x86_64-4.0.1.iso
vicidial trunk revision 1915
Asterisk 1.4.44-vici on a x86_64
HP Proliant DL 380 G7 , 2 Xeon CPU E5620 @ 2.40GHz , 16 GB RAM
guillecs
 
Posts: 4
Joined: Thu Jan 24, 2013 7:19 am

Re: Callbacks LIVE after reboot

Postby DomeDan » Mon Jan 28, 2013 7:46 am

I thought it was suppose to work like that :P I use it as a function,
if there's complains about callbacks that the agents don't want (yeah strange i know) then i just reset the hopper and everyone's happy.
I got other scripts to take care of the leads so they wont be stuck in the twilight zone forever.

but the reason they are removed from the hopper after a reboot is because the table vicidial_hopper is a memory-type table
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden

Re: Callbacks LIVE after reboot

Postby guillecs » Mon Jan 28, 2013 10:56 am

Although the hopper table were MyiSAM/InnoDB.. , or another kind, there is
a call in the file /etc/init.d/vicidial to $VICI_DIR/AST_reset_mysql_vars.pl
who has various sql sentences, one of them to delete the hopper:

$stmtA = "DELETE from vicidial_hopper where user LIKE \"%_$server_ip\";";


Only want to know it this way the system work its the right way, that
developers whised for the system, or if its a Use Case that was missed...
or there is another place in the system that put on again this callbacks.

I dont like this behaviour, but other people maybe yes, "about likes, colours"
1 Server: DB, WEB and TELEPHONY
vicibox 4.0.1 | VICIDIAL VERSION: 2.6-392a BUILD: 130102-1135 | From ViciBox.x86_64-4.0.1.iso
vicidial trunk revision 1915
Asterisk 1.4.44-vici on a x86_64
HP Proliant DL 380 G7 , 2 Xeon CPU E5620 @ 2.40GHz , 16 GB RAM
guillecs
 
Posts: 4
Joined: Thu Jan 24, 2013 7:19 am

Re: Callbacks LIVE after reboot

Postby williamconley » Mon Jan 28, 2013 2:47 pm

you could write a script to preserve the hopper at shutdown, and reload the same values after startup (or at least those that are callbacks ...).
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Callbacks LIVE after reboot

Postby DomeDan » Tue Jan 29, 2013 4:08 am

you're right, AST_reset_mysql_vars.pl will delete the hopper on boot, I didnt know about that.


guillecs wrote:Only want to know it this way the system work its the right way, that
developers whised for the system, or if its a Use Case that was missed...
or there is another place in the system that put on again this callbacks.

I would also like to know about this.
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden

Re: Callbacks LIVE after reboot

Postby williamconley » Tue Jan 29, 2013 11:40 am

Based on guillecs tests, I'd say yes. And it'll likely stay that way until someone posts a DIFF with a solution or pays someone else to fix it. :)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 76 guests