Reseting all a users callbacks

All installation and configuration problems and questions

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

Reseting all a users callbacks

Postby Cj4life24 » Wed Jun 20, 2012 8:27 am

So i guess i need some help or some clarfication. the company i work for decides to just reuse user numbers. so they always use #301-330 and as the numbers are used when someone leaves they are just replaced, Some of the agents i notice have some 300 callbacks set and i need to find a way to just clear all of a users callbacks to statrt fresh. I have tried inside the useser call back holds to release some but it will not release all because most of them are still active. cal anyone help me or do i have to do it lead by lead to reset it or can i do it with some sql code?
cj4life24

ViciBox Redux 3.1.9

VERSION: 2.4-316a
BUILD: 110531-2009

Single Server
OpenSUSE Server 11.2

Vspace from NComputing for L130 Thin Clients

Intel I5-2310 Quad Core
Cj4life24
 
Posts: 43
Joined: Mon Apr 16, 2012 8:34 am

Re: Reseting all a users callbacks

Postby williamconley » Sat Jul 07, 2012 10:00 am

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) If you are too lazy to go through the leads one at a time, or deal with the fact that the live ones will not release ... I'd say your best bet would be MySQL, absolutely. LOL. But you are sure that the link "Remove LIVE Callbacks older than one week for this user" is not sufficient for your task? (This link is on the User Callback Hold page for each user)
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: Reseting all a users callbacks

Postby Cj4life24 » Fri Jul 20, 2012 11:58 am

Thanks for the reply and help...I updated my signature with the specs you asked for.

Now Yes i am lazy....My compay uses the same user id's so when someone quits their id is just used by a new hire....So some of the users have 300+ callbacks each due to poor maganment and lack of direction by the last system admin. I know i can do it through MYSQL but i am really not comfortable doing it with out some help and direction. And i am aware of the link to dump callback on the user page but not all allbacks are LIVE so i can't dump them all. So i am looking for some possiable direction on hw to remove all callbacks through a MYSQl query....
cj4life24

ViciBox Redux 3.1.9

VERSION: 2.4-316a
BUILD: 110531-2009

Single Server
OpenSUSE Server 11.2

Vspace from NComputing for L130 Thin Clients

Intel I5-2310 Quad Core
Cj4life24
 
Posts: 43
Joined: Mon Apr 16, 2012 8:34 am

Re: Reseting all a users callbacks

Postby DomeDan » Mon Jul 30, 2012 7:28 am

I normally don't want to remove callbacks, I rather set them to recipient=ANYONE
something like this:
Code: Select all
UPDATE vicidial_callbacks c
INNER JOIN vicidial_list i ON i.lead_id=c.lead_id
SET c.recipient='ANYONE', i.status='CALLBK', c.status = 'ACTIVE'
WHERE c.user = '6666'
AND i.status IN ('CBHOLD','CALLBK')
AND c.status IN ('ACTIVE','LIVE');

then they will be called at the scheduled date and sent to any user,
warning: experimenting like I do can have consequences!

Well if you just want them to not appear in the callback-list for the user then just this would probably do the trick:
Code: Select all
UPDATE vicidial_callbacks SET status = 'INACTIVE' WHERE user = '6666';

but those leads the callback are for wont be called in that list
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: Reseting all a users callbacks

Postby Cj4life24 » Sat Aug 04, 2012 9:38 am

I used that script thank you it work for the most part but allowed me to atleast minimuze the leads tied up in call backs. question i modified the script and before i run it i want to make sure it will work, I just changed the set line to change the statuse on these to NEW will this do what i think it will and change all user only callbacks for user 301 to NEW?

UPDATE vicidial_callbacks c
INNER JOIN vicidial_list i ON i.lead_id=c.lead_id
SET i.status='NEW'
WHERE c.user = '301'
AND i.status IN ('CBHOLD','CALLBK')
AND c.status IN ('ACTIVE','LIVE');
cj4life24

ViciBox Redux 3.1.9

VERSION: 2.4-316a
BUILD: 110531-2009

Single Server
OpenSUSE Server 11.2

Vspace from NComputing for L130 Thin Clients

Intel I5-2310 Quad Core
Cj4life24
 
Posts: 43
Joined: Mon Apr 16, 2012 8:34 am

Re: Reseting all a users callbacks

Postby DomeDan » Mon Aug 06, 2012 4:29 am

If you want to do like that then you need to change it a bit to make sure that the callback is inactive
otherwise the lead might be called once because its NEW and a second time when the callback date is reached.
We can also add a statement to check that the user in vicidial_list is the same as in vicidial_callbacks to make sure that we are not removing someone else callback
and maybe you want to reset called_since_last_reset and called_count too
If your using more custom callback statuses, then they should be added to the list ('CBHOLD','CALLBK')
Code: Select all
UPDATE vicidial_callbacks c
INNER JOIN vicidial_list i ON i.lead_id=c.lead_id
SET i.status='NEW', i.called_since_last_reset='N', i.called_count='0', c.status='INACTIVE'
WHERE c.user = '301'
AND i.user = c.user
AND i.status IN ('CBHOLD','CALLBK')
AND c.status IN ('ACTIVE','LIVE');
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


Return to Support

Who is online

Users browsing this forum: No registered users and 76 guests