If new Tenants are being created, the Voicemail Directory is being created with 'root.root' permissions. Then when Asterisk tries to use this directory to create voicemails for the extension it gives an error message saying that it cannot write the directory because Asterisk does not own it.
If I change the ownership of the voicemail directory to 'asterisk.asterisk' then all works.
Error that was given:
[2012-05-02 09:04:01] WARNING: app_voicemail.c:1696 create_dirpath: ast_mkdir '/var/spool/asterisk/voicemail/default-SuperiorCabinet/2000/tmp' failed: Permission denied
Permission of the directory:
drwxr-xr-x 3 root root 4.0K Mar 27 15:48 default-SuperiorCabinet
After changing the permissions:
drwxr-xr-x 4 asterisk asterisk 4.0K May 2 09:18 default-SuperiorCabinet
It now works:
-- x=0, open writing: /var/spool/asterisk/voicemail/default-SuperiorCabinet/2000/tmp/bBjcwB format: wav49, 0x7f315ddd2088
What should I do to ensure that it works in the future without manually changing the permission?