Page 1 of 1

Voicemail : automatic removal of old messages

PostPosted: 04/02/2015, 19:57
Starting from rel 3.60, if you set an email in Dialplan as a destination for voicemail, the PBX removes automatically the copy of the voicemail files from the storage device, as soon as it has been sent by e-mail (see image 1).
image1.png (24.66 KiB) Viewed 5893 times

In case you set an extension number as the destination for voicemail the copy of the voicemail file will be saved locally on the storage device (see image 2).
image2.png (23.42 KiB) Viewed 5893 times

Consider that there is a limit of max 100 voicemail messages in in-box for each user. In case you set an extension number as the destination for voicemail you may use the following crontab configuration if you want to delete automatically the old messages. Starting from rel 3.80 (repository rel380) any change made in crontab will be saved permanently and will not be lost after reboot or update of the pbx.

1. SSH connection to the pbx -> menu 11 (Shell)
2. Type su and press Enter followed by the password wildix to log in as root user
3. Type crontab -e -u root and press Enter to open the crontab configuration file
4. Add the following line in that file :
0 0 * * * find /var/spool/callweaver/voicemail/<user_account>/INBOX -type f -mtime +2 -exec rm -R {} \;
5. Press CTRL-X -> Yes to save changes and exit from the file


- <user_account> must be substituted by the extension number, e.g. :
0 0 * * * find /var/spool/callweaver/voicemail/303/INBOX -type f -mtime +2 -exec rm -R {} \;
- +2 means delete files older than 2 days.
- you can add more lines if you need to enable this feature for more extension numbers (see image 3)
image3.png (59.49 KiB) Viewed 5893 times