Auto delay callbacks script?

All installation and configuration problems and questions

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

Auto delay callbacks script?

Postby atkins513 » Tue Apr 11, 2023 8:01 pm

I did a search for an answer to this but couldnt find anything. I currently have 25 callsbacks flashing at me to be called, but I would like to find a script to immediately delay them all by one day (tomorrow) but to be called at the same times they were scheduled for. It makes sense because that time was most ideal but I had missed a day and now I am being forced to call them all. A script or setting to move them all one day later but all the same times would be great. Can anyone help with this? In fact, is there a repertoire of scripts that or commands that are commonly needed or used that I can find somewhere? I also searched for this.

Thank you.



VERSION: 2.14-634c BUILD: 210421-2110
atkins513
 
Posts: 56
Joined: Fri Jul 03, 2020 12:31 pm

Re: Auto delay callbacks script?

Postby mflorell » Tue Apr 11, 2023 8:08 pm

You should be able to do that with an SQL query. How exactly were you wanting to trigger this?
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Auto delay callbacks script?

Postby atkins513 » Tue Apr 11, 2023 8:14 pm

Just a command through putty. I am still somewhat of an Amateur but have successful set Crontab Commands, and ran commands through Putty. I dont think this is anything I need to set nightly, but there are definitely times that I would like to reschedule all my own personal callbacks at once for the next day.
atkins513
 
Posts: 56
Joined: Fri Jul 03, 2020 12:31 pm

Re: Auto delay callbacks script?

Postby mflorell » Wed Apr 12, 2023 6:27 am

Here's a sample SQL query that can do what you're asking, you just need to adjust it for the 'user' who's callbacks you want to update, and you can run it in mysql("mysql asterisk"):

UPDATE vicidial_callbacks SET callback_time = (callback_time + INTERVAL 24 HOUR),status='ACTIVE',modify_date=NOW() WHERE status='LIVE' and user='1234567890';
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Auto delay callbacks script?

Postby martinch » Thu Apr 20, 2023 2:31 pm

You probably updated them all as per mflorell's advice which is nice and quick :) but this is for you or anyone else that chance's upon this thread.

    You can export your callbacks via Admin Panel -> Reports -> Admin Utilities -> Callbacks Export.
    You then look them up via Admin Panel -> Lists -> Search For A Lead.
    Then you can change the callback time in there.

Image

Takes a lot longer than what mflorell suggested but you do get the logging for accountability purposes if you need it. Technically, a callback is an agreement between you and the customer and some customers may be a little irked if you don't call them at the agreed date and time. Obviously some won't, it really depends on your customers. :)

Hope this helps.
Project Lead @ mDial -> https://github.com/TheBlode/mDial
martinch
 
Posts: 273
Joined: Thu Nov 15, 2018 9:14 am
Location: England, UK

Re: Auto delay callbacks script?

Postby atkins513 » Thu Nov 09, 2023 9:59 am

mflorell wrote:Here's a sample SQL query that can do what you're asking, you just need to adjust it for the 'user' who's callbacks you want to update, and you can run it in mysql("mysql asterisk"):

UPDATE vicidial_callbacks SET callback_time = (callback_time + INTERVAL 24 HOUR),status='ACTIVE',modify_date=NOW() WHERE status='LIVE' and user='1234567890';


Thank you so much for this, but it still leaves the MAIN issue in place. All the calls that were previously marked as LIVE, and flashing, now have new dates of the next day and are now scheduled to be called the next day, but they still show was LIVE callbacks even though when i look at them the date has not yet happened to trigger them. Meaning when set to force dial callbacks, i still have to go through every single callback before anything else can be done. How do I also clear the LIVE flags so that they are not currently triggered after they were moved using your previous command? Can we put the 2 commands in one, or is there another command I can run behind the first one to clear live flags also?

Thanks for all your help.
atkins513
 
Posts: 56
Joined: Fri Jul 03, 2020 12:31 pm

Re: Auto delay callbacks script?

Postby mflorell » Thu Nov 09, 2023 4:35 pm

The status is already updated as a part of the query I provided, it's changed to 'ACTIVE' so it won't show as live.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Auto delay callbacks script?

Postby atkins513 » Sat Nov 18, 2023 12:44 pm

Thank you greatly. This script worked perfectly. It was confusing because once you run it, it takes about a full minute for all the data to catch up on all the screens. Such as calls , and live or not live designations to set.
Thanks a ton.
atkins513
 
Posts: 56
Joined: Fri Jul 03, 2020 12:31 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 108 guests