Page 341 - Asterisk™: The Future of Telephony
P. 341

ways of doing this that can be very useful in larger, distributed networks, or environ-
               ments where tighter integration with external applications is desired.


               Storing Voicemail in an IMAP Server
               The ability to store voice messages in the same location as regular email is something
               that the telecom industry has been promising for a long time. They called it Unified
               Messaging, and while most PBXes now offer some sort of unified messaging, it is typ-
               ically very expensive to license and implement.
               Naturally, Asterisk cuts through all the silliness and just allows you to have your voi-
               cemailbox  integrated  into  an  IMAP  environment.  There  are  several  advantages  to
               storing your voicemail on an IMAP server. When you listen to a voicemail on your
               phone, the message is set to the read state on the IMAP server. This means that your
               email client will also note that it has been read. By the same token, if you listen to the
               message from your email client, the voicemail will turn off the message notification
               light on any phones that are assigned to that mailbox. Deleting a message from one
               place will cause it to be deleted from every place. So once deleted, the message is truly
               gone. This is Unified Messaging, the holy grail of voicemail to email integration, but
               Asterisk humbly decides not to make a big deal of it.
               IMAP integration is still new functionality, so there are a few things that need to be
               added in order to get it to function. First off, Asterisk needs to have an IMAP client
               installed so that it can communicate with the IMAP server. Pretty much any IMAP
               server works (even Exchange Server), and the authors have personally tested IMAP
               voicemail support with both the Courier-IMAP and Dovecot IMAP servers. The IMAP
               server may be on the same physical machine as the Asterisk installation, or it may be
               on the other side of the globe. To be able to access the IMAP server, Asterisk requires
               an IMAP client library. This library is the University of Washington’s free IMAP client,
               named c-client. To install the c-client you simply need to navigate to your /usr/src di-
               rectory and run the following commands:
                   # wget ftp://ftp.cac.washington.edu/mail/imap.tar.Z
               This downloads the source code. Extract it with:
                   # tar zxvf imap.tar.Z


                           You’ll want to pay special attention to the name of the directory that is
                           created by this command, as the directory name will probably change
                           again by the time you read this. During the production of this book, the
                           directory name has changed four times. The last time we checked, it was
                           named /usr/src/imap-2006h.

               Navigate into the resulting folder and run:

                   # make lrh IP6=4


                                                           Alternative Voicemail Storage Methods | 313
   336   337   338   339   340   341   342   343   344   345   346