Home > Asterisk, VOIP > Exchange 2010 UM with FreePBX 2.11 and Asterisk 11

Exchange 2010 UM with FreePBX 2.11 and Asterisk 11

October 14th, 2013 Leave a comment Go to comments

This article assumes that you have an Exchange UM server already configured. The directions cover the use of a module I created for FreePBX 2.11 and assume FreePBX is in device and user mode. The module removes the need to override macro-vm, which allows you to use Exchange UM for some users and FreePBX voicemail for others.

NOTE: Support for the MWI (message waiting indicator) and play on phone requires patching and compiling Asterisk from source. The patches were created against Certified Asterisk 11.2-cert2.

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, which made it into Asterisk 11.

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

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

  1. 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.
  2. 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.asterisk-11.2-cert-invite-domain-check.patchvim /etc/asterisk/sip_general_custom.conf
    ; Domains to accept REGISTER to and INVITE from
    autodomain=yes

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

asterisk-11.2-cert-sip-unsolicited-mwi-context-18762.patch

Now that Asterisk is configured we can move on to FreePBX.

Admin -> Modules
Select Upload modules and specify the file below.

exchangeum-2.11.0.0.tgz
exchangeum-2.11.0.1.tgz
SeeĀ Exchange UM 2.11.0.2 Integration for FreePBX 2.11 for the latest version.

Connectivity -> Trunks
Create SIP trunk to connect to the Exchange UM server. Make sure to change the IP to that of your Exchange server. Only add the unsolicited_mailbox line if you applied the unsolicited MWI patch.

Settings -> Exchange UM Settings
Specify the number of digits in your extensions. This should match the Exchange dial plan number of digits setting. If you have extensions that are longer they will be truncated to this length starting from the right hand side. Make sure to select the trunk you created in the previous step.

Admin -> Feature Codes
Configure the Exchange UM feature codes that will be used to access Exchange. The direct dial prefix is used from the Voicemail feature code section.

Applications -> Users
Select if the user will be using Exchange UM or the FreePBX voicemail. Even when selecting Exchange UM you must also selected Enabled for the Voicemail section. This is required due to how the module hooks into the macro-vm dialplan.

Applications -> Devices
If you are using MWI you must change the device mailbox to extension@exchvm or the context you specified when creating the trunk.

Categories: Asterisk, VOIP Tags: , , ,
  1. steve
    March 29th, 2014 at 09:35 | #1

    Nice article. Do you know if there are MS Exchange UM hosting companies? Thanks for the module, that’s awesome!

  2. tir2m2s
    August 18th, 2014 at 10:35 | #2

    Hello

    Could you please upgrade your module with support for multiple trunk in the trunk for exchangeUM ?

    We have 2 servers in load balancing in our exchange infrastructure.

    Thank you.

  3. August 25th, 2014 at 20:11 | #3

    @tir2m2s
    On of the businesses I have the module installed at also has a load balanced Exchange cluster. I have trunks for both Exchange servers defined in FreePBX and manually select the appropriate trunk during maintenance. Automatic failover wasn’t a huge concern considering FreePBX is a single server.

    I might have time in a few weeks to look at adding support for multiple trunks in the module. Alternatively I’ve posted the module on GitHub at https://github.com/excaliburpartners/exchangeum if you want take a stab at adding the feature.

  4. tir2m2s
    August 26th, 2014 at 07:13 | #4

    i’ll try to look at the source code, but i’m not a good developper .

    So if you have some time to look at this feature , i think many people have to thank you.

    I have seen another tutorial who use a route with 2 trunks to load balance the calls.

    Route -> exchangeroute int this route trunk sequence trunkexchange1 and trunkexchange2

    So in the module replace Trunk to exchange UM with route to exchange UM .

    What do you think of that ?

  5. November 12th, 2014 at 13:01 | #5

    @tir2m2s
    I’ve released version 2.11.0.2 which adds support for multiple Exchange organizations and servers. I recommend adding qualify=yes to the Exchange trunk configurations. This will allow Asterisk to know when an Exchange UM server is down.

  6. tir2m2s
    December 1st, 2014 at 03:27 | #6

    Thank you for the update 2.11.0.2.

    I’m gonna test this now.

  1. No trackbacks yet.