Page 1 of 1

Delete recordings less than xxkb

PostPosted: Thu Feb 08, 2018 6:16 pm
by perci100
Would be great to have an option in astguiclient.conf for the audio transfer scripts to delete recordings under xx kb or even before that point i feel like anything under like 25k is not worth saving but maybe i am wrong depending on compression. I figure it would be great to not even convert those files and save the resources. If i had the time id give it a shot

Re: Delete recordings less than xxkb

PostPosted: Thu Feb 08, 2018 6:27 pm
by mflorell
Sounds like a good idea, I would suggest posting your feature request to the Issue Tracker.

Re: Delete recordings less than xxkb

PostPosted: Tue Mar 06, 2018 2:54 pm
by VoIPEssential
Or you can just add a one-liner cron job:
0 0 * * * /bin/find /var/spool/asterisk/monitorDONE/MP3 -name "*.mp3" -size -25k -delete

Re: Delete recordings less than xxkb

PostPosted: Tue Mar 06, 2018 3:02 pm
by williamconley
VoIPEssential wrote:Or you can just add a one-liner cron job:
0 0 * * * /bin/find /var/spool/asterisk/monitorDONE/MP3 -name "*.mp3" -size -25k -delete

Doesn't save the CPU power from the scripts managing the file. Also doesn't delete the Recording DB entry which will still be linked to a non-existent file. But will save HD space (just not much).

We like to set the recording delay to about 5 seconds, which greatly reduces these but does not eliminate them.

Re: Delete recordings less than xxkb

PostPosted: Thu Mar 08, 2018 6:32 am
by dito
williamconley wrote:
VoIPEssential wrote:Or you can just add a one-liner cron job:
0 0 * * * /bin/find /var/spool/asterisk/monitorDONE/MP3 -name "*.mp3" -size -25k -delete

Doesn't save the CPU power from the scripts managing the file. Also doesn't delete the Recording DB entry which will still be linked to a non-existent file. But will save HD space (just not much).

We like to set the recording delay to about 5 seconds, which greatly reduces these but does not eliminate them.


i tried the delay option and it's working fine.
may be adding POSTSTATUS to record filename option
then the deletion will be based on non useful statuses (dnc drop etc) and just keeping sales callback etc..
did not try it yet but i will give it a try

Re: Delete recordings less than xxkb

PostPosted: Thu Mar 08, 2018 10:17 am
by williamconley
Now that sounds useful. A daily purge of useless recordings is an interesting concept.

Re: Delete recordings less than xxkb

PostPosted: Thu Mar 08, 2018 1:44 pm
by blackbird2306
Here is something similar based on call length (delete if less than xx sec.). It also updates the recording_log table in database and takes account of certain states of lead:
http://www.vicidial.org/VICIDIALforum/viewtopic.php?f=4&t=37868

Re: Delete recordings less than xxkb

PostPosted: Sun Mar 25, 2018 2:08 pm
by perci100
Sweet thanks guys. I was doing it with cron shortly after posting but didn't like the table entry still being there . Unclean data makes me twitch lol.

I just waste the bandwidth transferring them and my archive server does the rest so i'm not interfering with anything.

Re: Delete recordings less than xxkb

PostPosted: Sun Mar 25, 2018 2:08 pm
by perci100
Sweet thanks guys. I was doing it with cron shortly after posting but didn't like the table entry still being there . Unclean data makes me twitch lol.

I just waste the bandwidth transferring them and my archive server does the rest so i'm not interfering with anything.