How to protect a directory from being overwritten during updates?

I’m wondering how to protect a directory from being overwritten during package updates on Ubuntu 24.04. If I run a command like this, will it ensure that any files from the update are redirected to the sounds.divert directory, preventing the original directory from being automatically overwritten?

sudo dpkg-divert --add --local --divert /usr/share/asterisk/sounds.distrib /usr/share/asterisk/sounds

Ubuntu Version:
Ubuntu Server 24.04 LTS

Correction – I’m using Ubuntu 24.04 LTS. It is important to me that my symbolic link (ln -s /var/lib/asterisk/sounds /usr/share/asterisk/sounds) is not overwritten during a package update. Asterisk was installed from the official repository.

I’m using FreePBX, which uploads sound files to /var/lib/asterisk/sounds