Where is email notifaction and VM password in MySQL?

I am writing a PHP application to interface and streamline something I am doing with FreePBX, I am trying to remotely create an extension, one of the pieces is Email notification and Voicemail password.

Looking how FreePBX works I see how everything is sent to MySQL, however when looking at all the tables I cannot seem to find where the voicemail password and email notification is being stored.

Does anyone know?

Also I have a seperate script in which I need to send files to /var/lib/asterisk/sounds/custom/ folder

I need to use FTP protocol which is native to PHP without any additional libraries. The problem is that I have tried using VSFTPD as well as PROFTPD and I cannot FTP a file (even as root) into this folder. It keeps giving me permission denied.

I thought root has all permissions. I can get to any other folder just not this one or any with asterisk:asterisk as user/group and I wouldnt dare think of changing the permissions since I am sure it would screw up asterisk

Any advice on either of these two issues would be really appreciated

Thank you

Voicemail is still a text config file based thing (asterisk restriction)… /etc/asterisk/voicemail.conf is the file.

So then how does it work with FreePBX? it parses the info?

Also any idea on my FTP issue?

ftp I have no idea.

FreePBX reads the file in caches it, finds the extension is needs to change outputs everything before it, skips that line then outputs the rest of the file up to the change in contextif it has one then outputs the new extension info and processes any left over file stuff. For a new extension it does same thing but add’s it to the end ot the context list.

Not 100% sure about the ftp issue, but have you tried to ftp in using asterisk as the username? You may have to set a password for asterisk as well from the command prompt.


How can I mass-enable VM for all extensions with a pre-defined password? Will editing voicemail.conf be enough?

editing voicemail.conf would be fine

Just tried - no luck. I mean setting enabling VM to extensions that never had any VM setup. Inside db those having VM working also have VM context and non-NULL password and noanswer fields.

oops - I misread, you can edit them fine (like all the passwords) in voicemail.conf once they are created, but they must be created first. Sorry for not being clear.

To add/change/delete extension settings, try the latest version of the bulkextensions module. It uses the FreePBX API calls to update user, device, and voicemail settings pretty much like the FreePBX web page does. You can download it here:


Thanks, it made the trick.