IMAP voicemail

I’ve spent a good part of today hacking on asterisk 1.4.11 and freepbx2.3 to get this working. Unfortunately, not a lot of docs out there. I ran into several issues.

  1. The voicemail text message in /etc/asterisk/ will not work if sent to an IMAP server. The text is required to end each line with \r\n, not \n. Dovecot may not care (dunno), but Cyrus (which clarkconnect runs) bitches about ‘bare newlines’. I fixed it (for now) by manually adding the \r characters where needed.

  2. voicemail.conf needs several variables set for imap in the [general] section, but this file gets overwritten when some changes are made (via the GUI?) I wasn’t sure where the right place to put this was (there is no custom file for voicemail, so…)

  3. The current code in asterisk 1.4 really does NOT like multiple connectors to the IMAP mailboxes. This bit me because my cordless home phone is extension 200, whereas my snom is extension 202. I thought I’d just give them each the same imapuser (mine) and it would “just work”. Not really :frowning: So, I went to delete the mailbox stuff from extension 202, and I found that I could NOT make the ‘[email protected]’ go away in the GUI. I’d remove it and hit submit and it would come back :frowning: As long as it was there, things were getting gowed up.

If I can get this cleaned up some (which may require changes to the freepbx code to support IMAP, something I’d be glad to help with), I can write up a quick README on what to do…

For the uninitiated (that’d be me then) what are the advantages to IMAP voicemail?

Since MWI is based on whether it is a “new” message or not (which functionality IMAP has always supported- this is how your email client knows whether to highlight a message as “unread” or not), if you happen to read all new messages and listen to them via your web browser (or whatever), when you look at your phone, the MWI will be off since there are now no new messages. There are some other advantages. If you look at the asterisk 1.4 source tree, go to the ‘doc’ directory and there is an imapstorage.txt file that goes into all of this…

p.s. it was also to be useful for me as I have multiple extensions that want to use the same vmail box…

great to see you digging into the iMAP stuff, one of a handful of 1.4 features that I think many have been looking forward to. When you are ready, let me know and I can change your role so you can post a how-to over in the documentation on the iMAP. You can also let us know what your find once you get it all figured out wrt to any issues that FreePBX may be doing that would have to have behavior changed. Then we can look into an iMAP configuration option of some sort to work properly.

As far as voicemail and the [general] section, you should be able to edit stuff. I don’t recall off hand but I don’t think FreePBX writes to the file (not positive about that without checking). And it should not mess with the voicemail.conf file outside of editing individual extensions that are under its control. So if it doesn’t work to setup the file then try putting your stuff either just before or after the include files - then one way or another you can get yours to take in case it conflicts with what is there.

Philippe Lindheimer - FreePBX Project Lead
http// - IRC #freepbx

This is a great step forward i have a vm system that synch with exchange and it works great. So with this step i could see this closer to hapening in freepbx/asterisk. i certainly would like to hear more.

I did figure out a way to do what I wanted with the “multiple phones using the same mailbox”. I set my snom300 to “[email protected]” (the same as the house phone), but disable any vmail features. that way, the MWI flashes like the house phone. I will hopefully have something soon…

Okay, I’m ready to take a stab at the HOWTO.

I’m ready to do the HOWTO…

I just got back from 3 days of camping, so I will get you set up soon. Ping me if I forget as I’m going through a bunch of backlog. Thanks.

Philippe Lindheimer - FreePBX Project Lead
http// - IRC #freepbx

As the resident IMAP evangelist, i’ve beeen using IMAP forever. I mostly use dovecot, mostly because it’s easy to get going with. However, a hosting provider i often use has something else - can’t remember what. Thought it was cyrus, in fact, but i could be wrong.

Never had an issue with the messages being ignored or eaten.

However, I don’t typically use it in a ‘unified’ fashion, but instead to listen to messages on my smartphone (Nokia e70) when I’m out-and-about.

here ya go…

Sorry for bumping an old thread, and I certainly mean no offense to Dan up there, but I’ve written a more detailed howto for getting this going on trixbox, which might be helpful to others here. There are several warnings that need to be heeded, but I cover those in the document.

I have some thoughts in it on how to integrate in freePBX that the devs might be interested in. Or maybe it’s crap. :slight_smile:

Anyway, here it is:

Feel free to copy it here if you want.