Asterisk voicemail

From Wildsong
Jump to navigationJump to search

voicemail.conf

There are setting to turn on email integration, I should put them here.

For each user, edit the /etc/asterisk/voicemail.conf file to add a destination email address to each mailbox, for example:

100: 12345,Brian Wilson,[email protected]

Email message

To put in a custom email message (instead of the stock "Just wanted to let you know..") edit emailbody variable in voicemail.conf


See http://www.kartook.com/asterisk/asterisk-customize-the-email-notification-message/

IMAP integration

I want this soon...

Advantages

Postfix configuration

You have to have a sender email account in order to implement relaying - modern services use SASL login so you don't have to mess with pop or imap to send.

I have set up gmail and office365 accounts to do this.

I generally have a sender account with a relevant name, such as "[email protected]". For my own domains, I host my email at gmail so it's easy to set up another account.

=== Sasl file

sasl_passwd is a hash map in /etc/postfix containing a left side with a descriptor for the server and a right side with a colon delimited user and password. Like this.

[smtp.gmail.com]:587  [email protected]:mysecretpasswordhere

Don't forget to do a 'postmap sasl_passwd' after editing the file.

gmail

# Make email work with relay host (this part is common to gmail and office365)
smtp_sasl_auth_enable = yes  
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =    
smtp_use_tls = yes

# This is for gmail
relayhost = [smtp.gmail.com]:587

office365

Office365 requires that the FROM address match the account, so you have to rewrite anything outbound using the sender_canonical map. There has to be one entry for each user that will be sending mail. You could have multiple FROM addresses if you want to set them up in the sender_canonical and sasl_passwd files. Currently I just have one.

sender_canonical is a hash map containing pairs: left side: username; right side: desired FROM address For example,

root [email protected]
mailer-daemon [email protected]

Make sure you put all the required accounts in there, else some mail will go into the bit bucket. (include mailer-daemon, postmaster, webmaster, etc.)

Changes to main.cf

# These changes are for office365 (BAREIS)
relayhost = [smtp.office365.com]:587
sender_canonical = envelope_sever
sender_canonical_maps = hash:/etc/postfix/sender_canonical
smtp_always_send_ehlo = yes
smtp_sasl_mechanism_filter = login
smtp_tls_security_level = may