[Asterisk-Users] Voicemail and MS Exchange Synchronization

Craig Guy cguy at bigpond.net.au
Thu Jun 9 19:22:20 MST 2005


We have hacked together an LDAP / IMAP based voicemail for Asterisk to
replace a legacy voicemail app for a client.  We wrote it in Perl using the
Asterisk AGI interface and res_perl.  It retrieves voicemail account
information from netscape LDAP directory server and retrieves voicemails
from Netscape Messaging Server using IMAP.  It took about a week to write
the perl AGI.

The application doesn't use asterisk voicemail at all.  When a call comes in
asterisk does an ldap lookup using ldapget and if it finds an account
associated with ${EXTEN} it hands the call off to the agi (using deadagi)
which retrieves all the account information, answers the call and starts to
playback the users greeting. If a message is left then the AGI will record
it and then email it to the users mailbox on Messaging Server.  Pressing *
causes the voicemail box to prompt for the users pin number whereupon the
system then goes into a menu offering all the usual voicemail options.

For message retrieval the AGI gets the IMAP login information from LDAP,
logs into the users mailbox, retrieves all the subject lines for inbox and
counts the number of read and unread voicemails based on the subject line.
It then downloads voicemail attachments on demand and plays them back to the
caller.  If the caller deletes a voicemail then the appropriate IMAP command
is sent to delete from the inbox.  Conversely if the user deletes from the
email inbox then it will also disappear from Asterisk, seeing as Asterisk is
using the IMAP for the voicemail repository.  Greeting files are stored
locally on the Asterisk server however they are also shared via NFS so
greetings are available to callers connecting to other servers.

I don't see any reason why it wouldn't work with exchange and AD utilising
IMAP and ldap respectively.  There might be an issue logging directly into
users exchange mailboxes from IMAP cause I'm guessing the passwords may not
be available from AD but I'm sure there are ways around it.

Craig

----- Original Message ----- 
From: "Race Vanderdecken" <asteriskusers at codetyrant.com>
To: "'Asterisk Users Mailing List - Non-Commercial Discussion'"
<asterisk-users at lists.digium.com>
Sent: Friday, June 10, 2005 3:33 AM
Subject: RE: [Asterisk-Users] Voicemail and MS Exchange Synchronization


> (a) Has anyone cracked this nut (or started on it)?
>
>
> Been there, done that.
>
> No, really. I was the architect on the Premiere Tech, no PTECH,
> Orchestrate system. www.orchestrate.com (pardon the plug, but I am not
> endorsing one way or the other.)
>
> I also did the MAPI work for Persona, but that was a TTS and Speech Reco
> that read email and faxes, but I digress.
>
> Yes, your are going to go mad doing it.
>
> First.
> You need an email specialist.
> He must know POP, SMTP, IMAP and MAPI.
> MAPI is not a misspelling of IMAP; it is the Microsoft
> Messaging API.
> MAPI is how you can control the Exchange Server and Clients.
>
> You need to set up a "admin" account for the MAPI program to
> have access to the Exchange server.
>
> That is the easy part.
>
> Then you create a program to watch all the mail coming through
> the server. It will use the admin account and pass copies of messages to
> Asterisk and insert messages from asterisk.
>
> I suggest using the MAPI API to Exchange and a socket API,
> POP/IMAP, to asterisk.
>
> I built the aforementioned system buy using an UNIX email server
> to receive messages. All incoming messages were sent to the UNIX mail
> server. It had mail queues that could be intercepted, like an interrupt
> call back routine, messages would arrive, be put into queues, and sent
> for processing; convert email to speech via TTS, convert email to fax
> and such.
>
> The basic premises was that when the voicemail server, separate
> program and server (there where 200+ voicemail servers), received a
> voicemail it would create an email, put the voicemail file in it, or a
> link to the voicemail file, to the UNIX email server that would note/log
> the voicemail and pass it on to the exchange mail box.
>
> When the user deletes an email in Exchange a MAPI Message is
> sent back to the Exchange Server and watcher program will see the
> Exchange server delete it. Depending on the rules, the watcher program
> deletes the email or the voicemail or both, and so forth...
>
> You could create an addition to asterisk to act as the watcher
> program.
>
> That is the general idea and it does work. If you plan on doing
> TTS you are looking at 5 to 6 seconds of real-time to convert 1 sec of
> email to 1 second of voicemail.
>
>
> (b) Anyone interested if we post a bounty?
>
> If anyone does take the bounty I am available to consult for
> them. But I don't have time to create the entire work.
>
> Race "The Tyrant" Vanderdecken
>
>
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of George
> Pajari
> Sent: Thursday, June 09, 2005 1:19 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: [Asterisk-Users] Voicemail and MS Exchange Synchronization
>
> We have a customer considering migrating from a large Nortel PBX with a
> third-party voicemail system to Asterisk but one of the features they
> really like is the automatic synchronization of voicemail between
> Exchange and their voicemail system -- delete a message from the
> voicemail system and it is deleted from their email inbox and vice
> versa.
>
> Searching has not revealed anything like this being developed for
> Asterisk and yet it would appear to be a critical component needed to
> migrate customers used to fully integrated "Unified Messaging" systems
> to Asterisk.
>
> (a) Has anyone cracked this nut (or started on it)?
>
> (b) Anyone interested if we post a bounty?
>
> -- 
> George Pajari, netVOICE communications    604 484 VOIP (484 8647 x102)
> Open Source VoIP/Telephony Specialists  1 877 NET VOIP (638 8647 x102)
>                   www.netvoice.ca  www.ip-centrex.ca
>       www.digium.ca www.grandstream.ca www.sipura.ca www.snom.ca
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>




More information about the asterisk-users mailing list