Page 1 of 1
Auto delay callbacks script?
Posted:
Tue Apr 11, 2023 8:01 pm
by atkins513
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
Re: Auto delay callbacks script?
Posted:
Tue Apr 11, 2023 8:08 pm
by mflorell
You should be able to do that with an SQL query. How exactly were you wanting to trigger this?
Re: Auto delay callbacks script?
Posted:
Tue Apr 11, 2023 8:14 pm
by atkins513
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.
Re: Auto delay callbacks script?
Posted:
Wed Apr 12, 2023 6:27 am
by mflorell
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';
Re: Auto delay callbacks script?
Posted:
Thu Apr 20, 2023 2:31 pm
by martinch
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.
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.
Re: Auto delay callbacks script?
Posted:
Thu Nov 09, 2023 9:59 am
by atkins513
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.
Re: Auto delay callbacks script?
Posted:
Thu Nov 09, 2023 4:35 pm
by mflorell
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.
Re: Auto delay callbacks script?
Posted:
Sat Nov 18, 2023 12:44 pm
by atkins513
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.