Welcome Guest [Log In] [Register]

AWS FreePBX Updates
>>> Join the AWS FreePBX Updates Mailing List <<<


Posted Image

Welcome to TheWebMachine Networks AWS Support Forum. We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you register, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Registration on this forum is entirely optional and only needed to post in the forum. You can submit Support Requests using the blue button bar on the right side of this page. You can sign up for our AWS FreePBX Updates mailing list using the link above, beneath our Updates ticker.


Register now!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Switching to (and from) IMAP Voicemail Storage; This guide shows you how to use your own IMAP email server to store Voicemail for your users.
Topic Started: Apr 27 2017, 07:41 PM (803 Views)
TheWebMachine
Member Avatar
Administrator
IMAP VOICEMAIL STORAGE IS HERE!

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.

Now, before we get started, there are several VERY IMPORTANT things you must know:
  • 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:

  • SSH Console access to your instance and basic knowledge of SmartUpgrade (More information here: http://forum.thewebmachine.net/topic/8336033/)
  • An IMAP enabled email server or hosted email service
  • Username(s)\Password(s) for either:

    • a "postmaster" account with read/write access to all user folders (you'll still need the email usernames for your users); or
    • each of your users who will be using voicemail
  • An understanding of how your email server handles IMAP folders




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:

  • Switching of Asterisk VoiceMail Storage driver modules and restarting of all phone services === ALL calling services will be OFFLINE for approximately 3-5 minutes

  • Configuration of your mailboxes, if switching to IMAP === ALL calling services, EXCEPT VM, will be ONLINE during this phase - calls forwarded to VM boxes will receive an ERROR!

  • One final restart of services, if switching to IMAP, to ensure all new IMAP information takes effect === ALL calling services will be OFFLINE for approximately 3-5 minutes





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 this guide for more information: http://forum.thewebmachine.net/topic/8336033/

After you are connected to your instance via SSH, you will want to run the following command to initiate the driver switch: WARNING: THIS WILL INTERRUPT ALL CALLING SERVICES FOR 3-5 MINUTES!
SSH
 
smartupgrade vm-storage-switch

NOTE: 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 Escape for No

Posted Image

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

Posted Image

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




PHASE 2 - CONFIGURE GENERAL SETTINGS AND EXTENSIONS FOR IMAP STORAGE:

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:

  • The IP or FQDN and IMAP port # (default is 143) for your email server
  • IF using a "postmaster" account to access all mailboxes, you will need that account username and password
  • Your IMAP server's structure for users' mailbox directories. We will provide some common defaults in this guide, but your server may differ. If you don't have detailed information on your IMAP server's directory schema, this may require trial and error to get working properly
  • Whether or not your email server has SSL or TLS support for IMAP enabled. Of course, SSL and/or TLS is highly recommended to encrypt your messages in transit between servers.


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

Posted Image


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

Posted Image

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

  • IMAP Server Address - IP or FQDN of your email server
  • IMAP Server Port - Your email server's IMAP port. Default is 143
  • IMAP Auth User - This is the username for your admin-level "postmaster" account to access all mailboxes. YOU MUST LEAVE THIS BLANK IF YOU ARE USING INDIVIDUAL PASSWORDS FOR EACH MAILBOX!!!
  • IMAP Auth User Password - This is the password for your master postmaster account to access all mailboxes. YOU MUST LEAVE THIS BLANK IF YOU ARE USING INDIVIDUAL PASSWORDS FOR EACH MAILBOX!!!
  • IMAP Flags - This is where you specify options like ssl notls etc for IMAP connections. ALL OPTIONS ARE CASE SENSITIVE!!!
  • IMAP Folder - This is the folder where you want Voicemail Messages stored in your users' accounts. The Inbox/VoiceMail you see above will work for most email servers, but may need adjusting for some email servers.
  • IMAP Parent Folder - This option is only used in special cases with special email servers. You can probably leave this blank.
  • Greetings Folder - This is the folder where you want Voicemail Greetings stored in your users' accounts, IF the IMAP Greetings option is enabled below. You should not store these in the same folder as Voicemail Messages to prevent users accidentally moving or deleting their greetings. We suggest something like Inbox/VoiceMail/Greetings which will be a sub-directory within VoiceMail, instead.
  • IMAP Greetings - YES will place Voicemail Greetings in the IMAP folder listed above. NO will store VM Greetings on the server Locally and NOT on IMAP.
  • [Close|Open|Read|Write] Timeout - These adjust the amount of time Asterisk will wait for a response from your email server before timing out and presenting the caller with an error. We recommend leaving these at their defaults of "60" seconds each.


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:

Posted Image


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):

Posted Image


Submit your changes and then Apply Config.


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.
Spoiler: click to toggle



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!)
Spoiler: click to toggle





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

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

You must do one of the following to finalize everything:

  • Fully reboot your instance
  • Restart all services with the following command via SSH:
SSH
 
fwconsole restart




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.

If you are having trouble, our support staff is always here to help. Use the blue bar on the right side of this page to contact us! ---->


This page was last updated 2017-MAY-12 @ 4:20AM CST




Thank you for choosing AWS FreePBX!

If you like our product, please help us let others know by leaving a review on the AWS Marketplace!

We now have ANNUAL subscriptions available! An Annual Subscription gives you ONE MONTH FREE versus paying hourly.
Visit your AWS Subscriptions page to purchase annual subscription(s) for your instance(s) and start saving today!

Offline Profile Quote Post Goto Top
 
« Previous Topic · FAQ and Tutorials · Next Topic »
Add Reply

FreePBX® is a Registered Trademark of Sangoma Technologies and is used with permission.
TheWebMachine Networks is a fully certified Sangoma partner.