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: 28
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: 18278
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: 28
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: 18278
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


Return to Support

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 38 guests