Create Users Outside Gui/Pin Before Voicemail/Ftp Out

We have a production FreePBX server running and I would like to setup a special incoming route with some different functionality to process messages out to another server so there are a few special steps.

First I’d like to create users by PHP outside of the GUI. I saw the info here

Here, message number 18496 (as a new member I can’t post links)

and the script posted by Andrew Nagy works and I can create a user. The voicemail for the created user is disabled by default. It doesn’t seem to be in the users table this is controlled because whatever I wrote to the voicemail fields made no difference. Is that a different table that I need to write to in order to enable voice mail?

Second I’d like to prompt users for a pin before they can leave a voicemail. The flow would be users call in, dial an extension and before they are able to leave a message for the extension they get prompted for a pin. I saw some scripting here

On voip-info.org at wiki/view/Asterisk+authenticate+using+voicemail+passwords

That lets you use defined voicemail pins to authenticate, but can I use that and insert it into the the auto-generated extensions.conf file or would I be able to add for each extension in extensions_custom.conf?

Last is I’d like to call a script to FTP (and possible reencode the audio file) a message once it’s left, then delete it.

The production box info:

PIAF Installed Version = 2.0.6.2 under PROXMOX
FreePBX Version = 2.11.0.36
2.11
Running Asterisk Version = 1.8.8.0
Asterisk Source Version = 1.8.8.0

I’ve setup a test FreePBX on a Raspberry Pi to play with and experiment. I’m absolutely very new to Asterisk and FreePBX so any help or pointing me in the right direction is greatly appreciated!

I’m looking for this exact functionally. Did you have any luck @TaskMaster? Anyone who can weigh in would be appreciated :smile:

You would need to ensure that your code also added/replaced a voicemail box in the correct [context] of /etc/asterisk/voicemail.conf.