Table of Contents

Switching to/from IMAP Voicemail Storage

Now you can use your company's existing IMAP-compatible email server to store your voicemail! Give your users the convenience and ease of accessing their voicemail messages, complete with Caller ID information, right inside their email inbox! This has the added benefit of unifying storage of voicemail and email, making backups of data easier AND it alleviates storage needs on your AWS FreePBX instance. Your users will be bound by the same email storage quota for their voicemail messages and allow them an easier interface for managing messages. They can even organize their voicemail messages into folders just like their emails! This will allow your users to be more productive with more information at their fingertips in an instant, all from an interface they are already comfortable with.

IMPORTANT INFORMATION

  • Switching VoiceMail Storage locations is an “all-or-nothing” process. All mailboxes must use EITHER LOCAL OR IMAP storage. You simply CANNOT have some mailboxes stored locally and some on your IMAP server
  • You may have to supply the email PASSWORDS for every one of your voicemail users IF your email server doesn't support direct IMAP access to all user folders from a “postmaster” level account
  • There is NO method available to migrate EXISTING voicemails and greetings between Local and IMAP storage. The methods used to store information in each location is different. When you switch from Local to IMAP, users lose access to their locally stored greetings and voicemails, but the old files will still exist in local storage (/var/spool/asterisk/voicemail). When you switch from IMAP to Local, users will still see the old IMAP folders with the old greetings and voicemails in their email. The switching process does NOT delete existing data from either location. As a result, if you switch a server between locations after it has been in production a while, you will have to clean out the old storage location yourself
  • When using Voicemail in IMAP storage mode, you CANNOT use S3 Sync or Auto File Deletion services for Voicemail Messages. S3 Sync will still sync Voicemail Greetings if you elect to have those remain on Local storage

PREREQUISITES


BEFORE YOU SWITCH

You need to determine how you will connect to your IMAP server. Either your IMAP server supports a single “postmaster” style account where a single username/password combination can log into all other mailboxes and you simply need the email usernames of your voicemail users - OR - you will need the email usernames AND PASSWORDS of every one of your voicemail users. You will want this information gathered before you make the switch to reduce your downtime. We recommend that you refer to your email server's documentation or support personnel to confirm whether or not your email server supports a master “postmaster” account to access all other mailboxes.

You will also want to give users a chance to listen to and make note of any new or old voicemail messages in their mailboxes on your existing Local storage system. They will be starting with a clean voicemail box and will need to record new greetings after the switch is complete. Make sure they are prepared for what they have to do. While you can manage voicemail messages via the email inbox, voicemail greetings will still need to be recorded by phone.

Plan your migration time appropriately!!! This process could take you several hours to completely setup. This is especially true if this is an existing production server, you have a lot of extensions, and/or you have to manually enter in the passwords of every individual email user account! While you are performing this switch, you will experience downtime in (up to) three phases:


PHASE 1 - SWITCHING VOICEMAIL STORAGE DRIVERS

During this first phase, we must connect to the SSH Console so we can run SmartUpgrade and switch the VM Storage drivers. If you are unfamiliar with connecting to your instance with SSH and/or using SmartUpgrade, please see the relevant guides.

After you are connected to your instance via SSH, you will want to run the following command to initiate the driver switch:

smartupgrade vm-storage-switch

You can also access vm-storage-switch from the SmartUpgrade EXPERT-MODE menu, in the Troubleshooting and Maintenance section.

You will be presented with information (and a link to these instructions). You will be shown the current storage mode and asked to confirm to switch to the other mode. You can use your mouse to click Yes or No (if your SSH client supports it) or press Enter for Yes or ESC for No

After the process is complete, you will be presented with a message acknowledging the switch was successful and the current mode.

If you just switched TO LOCAL, you are finished with this guide. If you just switched TO IMAP, proceed to PHASE 2 below…


PHASE 2 - CONFIGURE GENERAL SETTINGS AND EXTENSIONS FOR IMAP STORAGE

General Settings

Now we need to configure the General Settings for IMAP Voicemail Storage. For this phase, we will perform these tasks from the FreePBX GUI. You need the following information:

Choose Voicemail Admin from the Settings menu in the FreePBX GUI:

On the Voicemail Admin page, choose the main Settings tab in the top row, then choose the IMAP Storage tab in the second row:

Fill in the necessary fields. Here's a description of each field on the page:

After you have entered this information, Submit your changes.

We need to change one more option. This will expose the necessary IMAP user fields in the Extensions module. Navigate to Advanced Settings under the Settings menu:

Locate the Voicemail Module section and change Provide IMAP Voicemail Fields to YES (you can simply search for keyword “imap” using your browser's in-page text search):

Submit your changes and then Apply Config

Mailbox Settings

Next, we need to add email mailbox usernames for each extension that has Voicemail enabled. There are two ways to do this:

Method #1

The manual way…by editing each extension individually from the Extensions module. This is fine for small deployments or those who only use a couple of central voicemail boxes. If you have or are planning a large deployment with dozens/hundreds/thousands of voicemail boxes, you will want to see Method #2 below for using the Bulk Handler. Small deployments can use either method, but may find Method #2 more cumbersome for so few mailboxes.

Once this is finished, you'll want to Submit and Apply Config to make the changes live.

Method #2

The semi-automated way…using the Bulk Handler module to export your Extensions to an Excel-friendly CSV file you can enter the usernames/passwords and then import to FreePBX. This is the best way to handle a large number of Voicemail boxes and extensions. (This is also the fastest way to add/edit/manage a large number of extensions/DIDs/Inbound Routes/UCP Users/Blacklists/Contact Lists in a large deployment and is fairly robust!)


PHASE 3 - FULL RESTART OF SERVICES FOR ALL CHANGES TO TAKE EFFECT

THIS WILL INTERRUPT ALL CALLING SERVICES FOR 3-7 MINUTES!

You must do one of the following to finalize everything:

That's it! Voicemails and Greetings will now be stored in your emails inboxes as you have selected above. As noted at the beginning of this guide, NO VOICEMAIL MESSAGES OR GREETINGS ARE COPIED TO THE IMAP SERVER. All mailboxes will be starting clean. At this time, you will want to test that everything is working as expected. Call one of your configured extensions and leave a Voicemail message. Then log into the email account configured for that extension and confirm that a new email message exists with the new Voicemail message in it. Once you have confirmed that Voicemail messages are storing on the IMAP server, test that you can record new Unavailable, Busy, and Vacation Announcements and Recorded Name on that extension. Those should also show up as new email messages in the email folder you assigned in general IMAP settings.

Once these tests are complete, your users are ready to record their new Announcements and such and you are ready to return to a full production environment.