Our Services

 

Your source for complete IT solutions

The Exchange UM module for FreePBX allows for quick and easy integration of Asterisk with Microsoft Exchange Unified Messaging.

The module is released under the GPLv2 license and distributed without any warranty. Support will only be provided to customers of Excalibur Partners, LLC.

System Requirements

  • FreePBX 2.11, 12, 13
  • Asterisk 1.8 (deprecated) or 11, 13
  • Exchange 2007, 2010, 2013

Compatibility

  • Asterisk 1.8: Must be patched and built from source. Not tested for compatibility with Exchange 2013.
  • Asterisk 11 / 13: Patching and building from source required for MWI (message waiting indicator), voicemail direct access with multiple servers, and in most cases play on phone support.
  • Exchange 2007: No support for MWI is available

FreePBX Configuration (Settings -> Advanced Settings)

The module was designed using FreePBX with device and user mode enabled.

  • User & Devices Mode = deviceanduser

FreePBX Trunk Configuration

Create a new Trunk in FreePBX, check the Continue if Busy box, and configure the Outgoing Settings like the below. For Exchange 2007 and 2010 a trunk needs to be created for each server running the Unified Messaging role. For Exchange 2013 a trunk needs to be created for all servers. Remove qualify=yes for Exchange 2013 servers only having the mailbox role.

type=peer
host=IP or Hostname of Exchange Server
transport=tcp
insecure=port,invite
canreinvite=no
context=from-internal
unsolicited_mailbox=@exchvm
qualify=yes

Asterisk Configuration

Start by enabling Asterisk SIP tcp support, SIP redirections, and disabling diversion headers. When a call is made to Exchange on port 5060 it will issue a redirect to port 5065 or 5067. With Asterisk 1.8 SIP diversion headers were added. Exchange only expects a diversion header when leaving a voicemail. It can’t handle the unconditional diversion header when the redirect occurs. Asterisk Jira issue 16862 adds support to disable the diversion header using the send_diversion option, which made it into Asterisk 11. With Asterisk 1.8 you will need to apply the diversion patch.

vim /etc/asterisk/sip_general_custom.conf
   ; Exchange UM settings
   tcpenable=yes
   promiscredir=yes
   send_diversion=no

Direct Access

The unified messaging role was changed slightly for Exchange 2013. Calls are sent to the 2013 CAS server, which redirects the call to the appropriate mailbox role server or legacy unified messaging server. When direct dialing from an unknown caller id to access voicemail the Exchange server will prompt for the extension. Since the call is already answered Exchange can't redirect the call, but instead blind transfers the call. The issue arises in that Exchange 2013 transfers to sip:hostname.domain.com leaving out the extension. Asterisk doesn't know how to handle this. You will need to apply the xfer domain patch, which tells asterisk to look for the s extension when no extension is provided.

Play on Phone

If you need the play on phone functionality you have two options:

  • Make sure your device ids do not match your extension ids. Exchange creates the call from the extension to the extension. If the device exists Asterisk will send back 403 unauthorized to Exchange.
  • Enable Asterisk domain support and apply the invite domain check patch. This patch limits matching on invites to domains in the Asterisk system. When Exchange creates the invite the domain will be of the Exchange box, which will avoid the 403 unauthorized issue.
 vim /etc/asterisk/sip_general_custom.conf
   ; Domains to accept REGISTER to and INVITE from
   autodomain=yes

Message Waiting Indicator

Asterisk only has support for unsolicited MWI for a single mailbox. Asterisk Jira issue 17362 has a patch that adds support to Asterisk 1.8 for unsolicited MWI for multiples mailboxes in a defined context. I have updated this patch for Asterisk 11.

Downloads FreePBX

Downloads Asterisk 13

Downloads Asterisk 11

Downloads Asterisk 1.8

Exchange Versions Tested

  • Exchange 2010 SP2
  • Exchange 2010 SP3
  • Exchange 2013 SP1
  • Exchange 2013 SP1 CU12
  • Exchange 2013 SP1 CU14

Asterisk Releases Tested

  • Certified Asterisk 1.8.15-cert3
  • Certified Asterisk 1.8.15-cert5
  • Certified Asterisk 11.2-cert2
  • Certified Asterisk 11.6-cert11
  • Certified Asterisk 11.6-cert13
  • Certified Asterisk 11.6-cert15
  • Certified Asterisk 13.8-cert3

Changelog

  • 2.11.0.6 - Fixed compatibility issue with FreePBX 13
  • 2.11.0.5 - Adds compatibility for FreePBX 13
  • 2.11.0.4 - Add support for direct access to Exchange 2013 with multiple servers
  • 2.11.0.3 - Fix security vulnerability allowing callers to initiate a transfer
  • 2.11.0.2 - Adds support for multiple exchange organizations and servers
  • 2.11.0.1 - Adds configuration option to initially setup users
  • 2.11.0.0 - Initial release

Source Code

It you would like to contribute bug fixes or additional functionality the source code is available on GitHub.

Call us today for more information

(703) 962-7450

JoomShaper