However it seems that manual campaigns do not clean up after themselves. I don't mind having to run a cleanup cron every 5 minutes, but I want to make sure I am doing it safely.
What I did this time was:
- Code: Select all
delete from vicidial_auto_calls where phone_code != 1;
--this is safe for me
delete from vicidial_auto_calls where last_update_time < NOW() - interval 90 minute;
-- not too fond of this one... if someone is on a call for >90 minutes i think they will end up getting multiple calls at once.
delete from vicidial_auto_calls where channel is null;
-- yeah that one cleared a lot... but I fear that it could be very dangerous.
Heres whats consistant of the records stuck in that table.
They are all in a manual campaign.
status="XFER"
channel is null
call_type="OUT"
stage="OUT"
Could someone help me identify what is safe to delete. Is a null channel a safe thing to look for, or could i accidentally be delete calls that are just about to dial out?
Or even better, does anyone know why the record didn't clear out in the first place.