Home | Using OpenOffice.org from Java Applications >>

Asterisk IMAP store for Voicemail

Using Dovecot, Astersik 1.4 and Ubuntu edgy

Since version 1.4 Asterisk supports IMAP as a store for voicemail. The IMAP integration allows voicemail to be managed either through your email client or by phone through Asterisk's voicemail application.

Sending email notifications for new voice messages has been supported since the very beginning, the news is that you are now operating on the same data store. That means if you read a message in your email client it is also marked read when you use the phone to query messages. It's amazing to see the MWI (message waiting indicator) on your phone switch off as soon as you select the message in your mailbox. Of course messages can also be deleted and forwarded using both systems.

To enable support for the IMAP store you need the UW-IMAP client library.

Ubuntu (at least up to feisty) ships with an old version of UW-IMAP's client library (libc-client-dev from 2002, Asterisk requires version 2004 or 2006.
As Asterisk links statically against c-client this is not a big problem, just download a recent version, compile it and point Asterisk to it – there is no need to install it.

root@eins:/usr/local/src# wget ftp://ftp.cac.washington.edu/imap/imap-2006g.tar.Z
root@eins:/usr/local/src# tar xvfz imap-2006g.tar.Z
root@eins:/usr/local/src/imap-2006e# make slx EXTRACFLAGS="-I/usr/include/openssl -fPIC"
root@eins:/usr/local/src/asterisk-1.4.0# ./configure --with-imap=/usr/local/src/imap-2006g

Note: Use the absolute path for --with-imap or the Asterisk build will fail.

Add the following to your voicemail.conf:

imapserver=localhost
imapfolder=Voicemail
imapflags=notls
authuser=asterisk
authpassword=password

Asterisk must have access to all user's Voicemail folder. To accomplish that you can use the the "master user" feature available with recent versions of dovecot since 1.0-b4. Just add a new passdb section to your dovecot.conf:

auth default {
...

passdb passwd-file {
args = /etc/dovecot/dovecot.masterusers
master = yes
}

...
}

Note: Ubuntu edgy (6.10) comes with dovecot 1.0-rc2 and works out of the box, 6.06 LTS (dapper) comes with 1.0-b3 and requires an update.

with dovecot.masterusers containing the asterisk user:

asterisk:{PLAIN}password

The last thing you have to do is assigning the IMAP user to your voice mail accounts in voicemail.conf:

1234 => 4321,John Doe,,,imapuser=john

And don't forget to create the Voicemail IMAP folder for that user before you receive the first message.

Tags :


How do you create the folder?

You mention to create the folder, but how do you do that?

Add a comment Send a TrackBack