System information
To compile for a 32-bit platform with OpenSSL support and a preference for connecting
via IPv4:
$ make lnp EXTRACFLAGS="-I/usr/include/openssl" IP6=4
If you don’t wish to compile with OpenSSL support, simply remove the -I/usr/
include/openssl from the EXTRACFLAGS option. If you would prefer connecting by IPv6
by default, simply don’t specify the IP6=4 option.
When installing IMAP support, we have always compiled the c-client
library from source. However, it may be available as a package for your
distribution. For example, Ubuntu has a libc-client-dev package availa-
ble. It may work and save you some trouble, but we have not tested it.
Compiling Asterisk
After compiling the IMAP library, we need to recompile the app_voicemail.so module
with IMAP support. The first step is to run the configure script and pass it the --with-
imap option to tell it where the IMAP library exists:
$ cd ~/src/asterisk-complete/asterisk/1.8.0
$ ./configure --with-imap=/usr/src/asterisk-complete/thirdparty/imap-2007e/
Once the configure script has finished executing, we need to enable IMAP voicemail
support in menuselect:
$ make menuselect
From the menuselect interface, go to Voicemail Build Options. Within that menu, you
should have the option to select IMAP_STORAGE.
If you don’t have the ability to select that option, check to make sure
your IMAP library was built successfully (i.e., that you have all the re-
quired dependencies installed and that it didn’t error out when building)
and that you correctly specified the path to the IMAP library when run-
ning the configure script. You can also verify that the IMAP library was
found correctly by looking in the config.log file (located in your Asterisk
build directory) for IMAP.
After selecting IMAP_STORAGE, save and exit from menuselect and run make install, which
will recompile the app_voicemail.so module and install it to the appropriate location.
The next step is to configure the voicemail.conf file located in /etc/asterisk/.
Configuring Asterisk
Now that we’ve compiled IMAP support into Asterisk, we need to enable it by con-
necting to an IMAP-enabled server. There are many IMAP servers that you could use,
including those supplied with Microsoft servers, Dovecot, and Cyrus on Unix, or a
414 | Chapter 18: External Services