Navigate to the following path and open maintenance file using you favourite terminal editor. I use nano.
sudo nano /etc/cron.daily/fusionpbx-maintenance
find section for fax and edit number of days as required. in my case I have setup 15 days. Any fax older than 15 days will be deleted from the server.
find section for voicemail and adjust the number of days. I have setup voicemails older than 15 days to be deleted from the server
Finally add cron job so the scripts runs at your scheduled time and deletes the old fax and voicemails. below is my cron job which runs everyday at 9PM and deletes older data.