Looking for a locked down Voice Mail solution

I am looking to create Voice mail boxes that the users can not make any changes on. My situation is that my organization operates housing that every room has a voice mail box attached to it with the current system. We are replacing that system with FreePBX. when a person wants to leave a message, they are prompted to enter the room number. they can only check and delete messages. They can not create or change there greeting. the caller just gets a simple “record you message now” and a Beep.


Anyone have any ideas for this I have a client who has asked me for something very similar today??

As root:-

for i in $(ls /var/spool/asterisk/voicemail///{greet,unavail,busy}.*);do chattr +i $i;done

1 Like

@dicko thanks for the response however I have no idea what to do with the info you have provided.

What exactly will your code do?

Where n how do we implement it??


When he said “as root” it meant that you had to logon your system as root (or, I guess, run it from sudo if the root account is not active) and run the command he gave.

What striker495 wanted but it might not be what you want…

It makes the greeting, unavailable and busy messages of everyone immutable (not modifiable)

re: https://en.wikipedia.org/wiki/Chattr#Attributes

Unless you want to lock down the greeting, unavailable and busy messages of everyone, you don’t…

If you only want to do that for some users you would need to only 'chattr +i" their greeting, unavailable and busy messages and not everyone’s like dicko’s command does…

If this seems too complex or hard to maintain I suggest you do a feature request (or pay Sangoma to do it if this is realllllly that important to you… :wink:).

Good luck and have a nice day!


Ok sorry about that I was simply over complicating this.

For just a few protected

for i in $(ls /var/spool/asterisk/voicemail//{201,202,203}/{greet,unavail,busy}.);do chattr +i $i;done

For just a few allowed

for i in $(ls /var/spool/asterisk/voicemail//{204,205,911}/{greet,unavail,busy}.);do chattr -i $i;done

Hi dicko!

Unless I am missing something (and it’s quite possible that I do…) shouldn’t this be preceded by protecting everything?

(Doesn’t this assume that they are already protected?)

Am I missing something?

Thank you and have a nice day!


Of course, just like a firewall, either permissive or prohibitive, your choice which order you run them . . .