Recommendations For IMAP Voicemail

Home » Asterisk Users » Recommendations For IMAP Voicemail
Asterisk Users 7 Comments

Hello,

I’m currently studying what is needed to implement IMAP Voicemail with Asterisk 11 and up.

More precisely, I would like to let users check voicemail with their smartphone from outside (ie not connected to LAN).

My first questions are:

1. What happens if Asterisk cannot reach its configured IMAP store ? Are voicemails locally stored in a persistent directory surviving reboots or are they lost for ever ? Are voicemails saved back to the IMAP store whenever the IMAP store is back online ?

2. From personal experience, would you rate an IMAP migration as an easy or as a difficult task ?
By IMAP migration, I mean changing from one IMAP software to another, on the same or on an other box.

Regards

7 thoughts on - Recommendations For IMAP Voicemail

  • There is software called ‘imapsync’ which will sync mail from one imap store over to another. I have used that to migrate from one server to another and it was pretty painless. It took a while to do but it does it a mail at a time so it is something you can run while everyone is using the system and then right at the end you just need to do a final sync while voicemail is disabled.

  • imapsync seems a very interesting tool. Thanks for sharing this.

    Now I’m still curious to learn if moving from local file storage to cloud IMAP storage is still resilient to short network outages (without IMAP
    replication).

    Regards

    2015-05-06 10:18 GMT+02:00 Gareth Blades :

  • With regard to your question about the imap store I highly suspect that if it is unavailable when the message is saved then the message will be lost. There are configuration options for the timeout and it might retry a couple of times but Asterisk has no scheduling so I cannot see a way for it to record the fact that there are voicemails waiting to be uploaded.

    You are concerned about reliability but this is not an easy thing to fully plan for. You could have a couple of asterisk boxes with config stored in a database which is replicated between two of them. For voicemail and general audio storage this could be on a NAS which replicates data over to a backup. However if the primary NAS fails then because you are using NFS this has a tendancy to hang which will cause problems. You could use IMAP for storage but you are pushing the file storage issues just furthur away. If you use an IMAP store based on MAILDIR++
    then you can have multiple IMAP servers mounting the same data and it will work fine however this approach typically has a poor performance when it comes to stat files in a mailbox so if you have lots of voicemails asterisk will pause a long time. Other systems such as Cyrus which use a database are much faster (sometimes 100 times faster!) but much slower when it comes to storing new files.

    We have a redundant pair of opensips servers performing load balancing between multiple asterisk boxes which have a large gluster file storage mounted on each. Thats a large number of machines but is the sort of topology you need for something to be fully fault tolerant.

  • Hey;

    It seems to me that for what you want to do, it would be easier just to email the user the voicemail audio file as an attachment. I believe that when you choose to store voicemails using IMAP, it applies to all of your users which may not be what you want to do.

    Regards;

    John

    From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Olivier Sent: Tuesday, May 05, 2015 12:53 PM
    To: Asterisk Users Mailing List – Non-Commercial Discussion Subject: [asterisk-users] Recommendations for IMAP Voicemail

    Hello,

    I’m currently studying what is needed to implement IMAP Voicemail with Asterisk 11 and up.

    More precisely, I would like to let users check voicemail with their smartphone from outside (ie not connected to LAN).

    My first questions are:

    1. What happens if Asterisk cannot reach its configured IMAP store ? Are voicemails locally stored in a persistent directory surviving reboots or are they lost for ever ? Are voicemails saved back to the IMAP store whenever the IMAP store is back online ?

    2. From personal experience, would you rate an IMAP migration as an easy or as a difficult task ?

    By IMAP migration, I mean changing from one IMAP software to another, on the same or on an other box.

    Regards

  • 2015-05-06 17:51 GMT+02:00 Tech Support :

    Yes that’s true but still, for users with an “intensive voicemail usage”, unified messaging is attractive. In the long run, is unified messaging still rated as useful ? I honestly don’t know.

    Yes. These days, voicemail storage type is still a compilation time option, that apply to all users.

    Maybe, those attending to Astricon Dev sessions could explain us if voicemail storage customization could be introduced in a future version.

    Cheers

  • I’d be tempted to have a script, invoked by cron, to trawl through
    /var/spool/asterisk/voicemail/ and IMAP-ify messages just for those users who need that functionality.

    The nature of voicemail is such that it doesn’t matter too much in the great scheme of things if the recipient winds up getting it a little bit late.

  • Hey;

    What you may want to do is specify the “externnotify” option in voicemail.conf. If you set something like:

    externnotify=/full/path/to/imap-script

    the script will run right after a voicemail is received so you won’t have to worry about any time delays. The command specified for externnotify is run with the arguments (in this order): context, extension, new voicemails, old voicemails and urgent voicemails. I tried it myself and it works fine for me.

    Regards;

    John

    From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com]

    I’d be tempted to have a script, invoked by cron, to trawl through /var/spool/asterisk/voicemail/ and IMAP-ify messages just for those users who need that functionality.

    The nature of voicemail is such that it doesn’t matter too much in the great scheme of things if the recipient winds up getting it a little bit late.