Asterisk VM integration with MS Exchange IMAP

I am trying to integrate VM with MS Exchange IMAP Server. I can get authenticated with the users account and see the connection in Exchange. When I leave a message it shows up in my exchange Inbox and I can check it thru the phone but periodically Asterisk will lock up with after the following message in the CLI:

[Aug 17 10:59:19] WARNING[26191]: app_voicemail.c:8572 mm_log: IMAP Warning: Unexpected tagged response: 0000003a OK SEARCH completed.
[Aug 17 10:59:19] WARNING[26204]: app_voicemail.c:8572 mm_log: IMAP Warning: Unexpected tagged response: 0000003e OK NOOP
completed.

Then the only way to exit is to Ctrl-C out of Asterisk. Here is a copy of my Voicemail.conf

imapserver=192.168.8.15
imapport=143
imapflags=notls

2992 => 1234,Erik,imapuser=user|imappassword=test

Any help would be appreciated. I have it working with Dovecot IMAP just fine but would like to integrate with users Exchange Inbox.
It looks like MS sends different IMAP commands or does not understand the UW IMAP client commands that are sent.

Thanks,
Erik

I just set my postfix configs to relay off my exchange box and used the user’s local mailbox as the email address and let Asterisk send the message as normal. Easy, and it works great.

Have you been able to make Asterisk communicate with Exchange ?

I was able to get Asterisk VM to use MS Exchange using IMAP storage, just yesterday. I had to modify c-client from the UW imap-2007b source code. Right now it’s completely a hack, and probably will only login to an MS Exchange IMAP server. Though it only required adding/modifying four lines of code. PM me if you would like to look at the source code changes. I’d like to work on a more elegant solution before posting it widespread to the community.

Yes, there is a way with Exchange 2003 to use a master user. After doing lots of IMAP hacking and testing on Exchange 2003, I found that there IS A WAY!!! I am using Asterisk 1.6.1-Beta2, but this should also work in 1.4.x as it is Exchange specific, not Asterisk specific.

I’m sure this is the long awaited for secret that many IT Professionals have been looking for and here is how it works…

In your voicemail.conf:

[size=59]ext_num=>vm_pass,user_name,user_email,user_pager_email|imapuser=domain.com\admin_user_name\mailbox_name|imappassword=apmin_user_password[/size]

The admin username is just the username, and the mailbox name is just the prefix (before the @ symbol) of the e-mail address.

Example:

1688 => 1234,1688,user@domain.com,,tz=central|imapuser=domain.com\vmadmin\user|imappassword=Asterisk123
It works for me, let me know if it works for the rest of you!!!

Thanks,

Jeff

One ‘workaround’ is to talk directly the the SMTP server of Exchange (via. a script) - and let that deal with the IMAP connection(s).

Bit of a cheat I know - but it works for me :smile:

[quote=“BlargMaN”]Yes, there is a way with Exchange 2003 to use a master user. After doing lots of IMAP hacking and testing on Exchange 2003, I found that there IS A WAY!!! I am using Asterisk 1.6.1-Beta2, but this should also work in 1.4.x as it is Exchange specific, not Asterisk specific.

I’m sure this is the long awaited for secret that many IT Professionals have been looking for and here is how it works…

In your voicemail.conf:

[size=59]ext_num=>vm_pass,user_name,user_email,user_pager_email|imapuser=domain.com\admin_user_name\mailbox_name|imappassword=apmin_user_password[/size]

The admin username is just the username, and the mailbox name is just the prefix (before the @ symbol) of the e-mail address.

Example:

1688 => 1234,1688,user@domain.com,,tz=central|imapuser=domain.com\vmadmin\user|imappassword=Asterisk123
It works for me, let me know if it works for the rest of you!!!

Thanks,

Jeff[/quote]

The Above worked for me… I didn’t have to do any extra configuration at all. No scripts, and no special dialplan setups or nothing. It just worked… You just don’t have to specify

authuser= authpassword=

So this really isn’t a workaround, it’s just how it has to be done to get Exchange to work correctly…

Jeff

Just tested it in my dev environment and works as advertised :smile: Using Exchange 2003 and Asterisk 1.6.0 latest svn. I can call in and leave a message and it posts to the IMAP account, when it is read the MWI light goes off, and if I mark it as unread, the MWI light comes back on.