Voicemail - Send to e-mail from database query instead of fixed

I need to change the e-mail address of an extension when someone leaves in his inbox a voice message, so Asterisk shall send the e-mail to the new address instead of a fixed one.

Is it possible to establish the voicemail address based on a query rather than a fixed parameter?

I’ve been trying to figure out where to input my query, but since the voicemail works with config files (voicemail.conf which includes vm_general.inc and vm_email.inc), I can’t execute a query inside of those.

I haven’t succeeded on checking which process triggers the postfix and sendmail programs since the CLI doesn’t provide that info as well

Regards

You can use realtime for this, Store your voicemail.conf data in your database backend of choice and configure app_voicemail to look there for it’s config.

Then you can use the odbc function to change the email address.

https://wiki.asterisk.org/wiki/display/AST/Realtime+Database+Configuration

I think all Unix MTAs will do this, so configure an alias in Asterisk and then configure the MTA to translate that to the real address.

Mail Transport Agent.

Thanks for the reply. I’m a little bit lost in terms of aliases in Asterisk + managing of postfix and sendmail. Is there any resource where I can check the usage of those?