Problem with recordings

I deleted the call recordings from the /var/spool/asterisk/monitor/2024 folder, now I have something like the one below when I call from outside to a number connected to freepbx. It’s like that with all recordings. When I call from an extension there is no problem. How to fix it?

From a shell

mysql asteriskcdrdb -e "DELETE FROM  cdr WHERE calldate LIKE '2024%'; DELETE FROM cel WHERE eventtime LIKE '2024%'"

(Deleting records does not necessarily reduce the size of the database)

Can I ask for the same only for recordings removed from the /var/lib/asterisk/sounds/pl/custom path?

I deleted all files that had “lek” in their name

mysql can’t delete the files, just the references to it in the database but

rm -rf /var/lib/asterisk/sounds/pl/custom/*

will delete all files and directories below /var/lib/asterisk/sounds/pl/custom

what I mean is that I deleted all files containing “lek” in the name from this path. I have the same problem again. how to fix it now?

Not sure I understand what ‘lek’ is about , the GUI show all the references still in the mysql table(s), if you delete the files referenced then you break the GUI, on the other hand, if you delete the mysql table references then the GUI won’t show the files even if they are still there.

I deleted files with “drug” in their name from this path. I had previously deleted them in the admin system recordings tab. now when I call the number I have the same problem as before. I thought I needed to remove something else from the database. what should I do to fix it?

/var/spool/asterisk/monitor is where call recordings are kept and managed in the asteriskcdrdb database, however recording are in /var/lib/asterisk/sounds/{language}/ and are manged by the ‘recordings’ table in the asterisk database

mysql asterisk -e 'DESCRIBE recordings;SELECT * FROM recordings'

filename is the relative path to the basename of the ‘system recordings’ starting at /var/lib/asterisk/sounds/{language}/ there might be more than one format (.extension) for each file but there will only be one row for each recording.

{language} is replaced by the channels ‘language’ variable the format played depends on the codec selected for the bridged channel. Modify the ... DELETE FROM recordings WHERE xxx and rm -rf /var/lib/asterisk/{language}custom/yyy.* bits to suit.