How do I relate which call recording file is for which CDR record? Right now, we are doing guesswork based on {Exten# - CID - Date - Time} but I don’t think this is right.
The field uniqueid is the date in seconds , period, number of sessions since asterisk started, in the filename ‘,external-1010-2127551234-20221021-183125-1666402285.282801.mp3’
date -u -d @1666402285.282801
Sat 22 Oct 2022 01:31:25 AM UTC
suggesting you are in the 'central timezone ( -7 hours)
mysql asteriskcdrdb -e "select from cdr WHERE uniqueid='1666402285.282801'"
Do not forget to delete files after a specific time has elapsed.
This root crontab entry substituts files older than 30 day by a link to standard wav-file, which I extra recorded. (was an earlier recommendation from Dicko and/or BlszeStudios): @daily find /var/spool/asterisk/monitor/ -mtime +30 -exec ln -sf /var/lib/asterisk/sounds/de_DE/custom/thisfilehasbeenpurged.wav {} ;