Is there a way to tell what system recordings are in use and where?
I am trying to clean up files from our IVR and I find that if a system recording id in use and deleted, the place in use just reverts to “None” with no warning.
Want to delete some recordings, but don’t want to inadvertently break an announcement somewhere.
(Even a config file I can look thru would be great)
mysql -e "use asterisk;
select recordings.displayname as 'Recording Display Name',
recordings.filename as 'Recording Filename',
announcement.description as 'Announcement',
ivr_details.name AS 'IVR Name',
queues_config.extension AS 'Queue'
from recordings
LEFT JOIN announcement
ON recordings.id = announcement.recording_id
LEFT JOIN ivr_details
ON recordings.id = ivr_details.announcement
LEFT JOIN queues_config
ON
recordings.id = queues_config.callconfirm_id OR
recordings.id = queues_config.agentannounce_id OR
recordings.id = queues_config.joinannounce_id;"
It gets all of the configured recordings and their recording filename along with which configured announcements, IVRs and queues reference these recordings. I think these are the only locations that reference recordings but I might’ve missed one or more. Move the recordings you think are save to another directory and monitor the Asterisk full log for entries related to being unable to play back a file.
That got me pointed in the right direction, thanks!
Added the link to the follow me and ring group announcement and call confirm as well.
I think that covers all my bases.
USE asterisk;
SELECT recordings.displayname as 'Recording Display Name',
recordings.filename as 'Recording Filename',
announcement.description as 'Announcement',
ivr_details.name AS 'IVR Name',
queues_config.extension AS 'Queue',
findmefollow.grpnum AS "Extension",
ringgroups.grpnum AS "Ring Group"
FROM recordings
LEFT JOIN announcement
ON recordings.id = announcement.recording_id
LEFT JOIN ivr_details
ON recordings.id = ivr_details.announcement
LEFT JOIN queues_config
ON recordings.id = queues_config.callconfirm_id
OR recordings.id = queues_config.agentannounce_id
OR recordings.id = queues_config.joinannounce_id
LEFT JOIN findmefollow
ON recordings.id = findmefollow.annmsg_id
OR recordings.id = findmefollow.remotealert_id
OR recordings.id = findmefollow.toolate_id
LEFT JOIN ringgroups
ON recordings.id = ringgroups.annmsg_id
OR recordings.id = ringgroups.remotealert_id
OR recordings.id = ringgroups.toolate_id;