Integrating Exchange 2007 Unified Messaging with Asterisk

HTC One

HTC One

Beautifully Crafted

With over 300 new features, a completely live home screen, first of its kind living photo gallery and dual frontal stereo speakers.

More...
Samsung Galaxy S IV

Samsung Galaxy S IV

Life Companion

It's here: the Galaxy S IV has been unveiled. Where do you go when you're the biggest smartphone manufacturer in the world?

More...
BlackBerry Z10

BlackBerry Z10

BlackBerry 10

All BlackBerry, New Software. Designed to keep you moving.

More...
BlackBerry Q10

BlackBerry Q10

BlackBerry 10

Every feature, every part of this BlackBerry® 10 smartphone has been crafted with precision and designed for ultimate performance.

More...
Acer Liquid E1

Acer Liquid E1

Big Sights, Bigger Sounds

Optimised for entertainment, and for your budget.

More...
HTC One SV

HTC One SV

4G Connectivity

Beats Audio. ImageSense.

The practical phone for the demanding you.

More...
Windows Phone 8X by HTC

Windows Phone 8X by HTC

Powerfully personal

Amplified by Beats

A new, iconic design that keeps you connected while also reflecting you.

More...
Windows Phone 8S by HTC

Windows Phone 8S by HTC

Powerfully personal

Amplified by Beats

The smartphone to match your life at work and play.

More...
HTC Desire X

HTC Desire X

Authentic Sound

Powerful Performance

Stunning design with easy access to content and fast connectivity – making it the perfect all-round device.

More...
Samsung Galaxy Note II

Samsung Galaxy Note II

Note, the new way

Larger screen, thinner design, S Pen, AirView, Android Jelly Bean and more.

More...
Samsung Galaxy S III

Samsung Galaxy S III

Designed For Humans

Inspired By Nature

This sleek and innovative smartphone has the enhanced intelligence to make everyday life easier.

More...
HTC One X

HTC One X

Technology Leader

Quad Core Android Jelly Bean

Perfect for gaming, watching videos and surfing the net

More...
Option Beemo

Option Beemo

4G and beyond

Quad-band LTE

High-speed portable Internet access.

More...
ZTE MF60

ZTE MF60

Portable Internet

USB & WiFi for Windows and Mac

High speed, portable Internet access in your pocket.

More...
Option Icon XY

Option Icon XY

Stylish Design

Interchangeable Covers

Plug and Play installation, slim form factor, customisable covers, microSD slot and more

More...
Advance Replacement

Advance Replacement

Never be without a phone, contact us for details on our advance replacement service.

More...
Accessories

Accessories

Contact us for more information on our extensive top brand accessory portfolio.

More...
Free Delivery

Free Delivery

Get your order delivered free of charge when you spend over £150 online.

More...
Webshop On Demand

Webshop On Demand

Easily deployable with advanced functionality designed for the wireless industry.

More...
Seminars

Seminars

Unlock your profit potential with our complementary seminar programme.

More...
Frontpage Slideshow (standalone) | Copyright © 2006-2011 JoomlaWorks Ltd.

The Unified Messaging server role of Exchange 2007 offers the ability of integrating your IP PBX with Exchange, so that voicemail messages are delivered directly to the user’s Exchange Inbox.

It should be noted at this stage that SIPtrix already has the ability to deliver voicemail messages to the user’s Inbox as a WAV sound file attachment, however the Exchange UM server offers other functionality over and above voicemail delivery: Outlook Voice Access (OVA) technology enables users to dial into their mailbox from any ordinary telephone and have email messages and calendar entries read back to them. Once dialled in users can also verbally manage their Inbox, with commands such as ‘delete message’ or ‘forward message’.

An auto-attendant can also be configured whereby callers can say the name of the person they wish to speak to, and are directed to that person based on the information held in the Global Address List.

This post will look at how to configure Exchange 2007 Unified Messaging with SIPtrix, the IP-based VoIP PBX developed by Brightpoint. For more information on the SIPtrix product, see the documents on the FTP site:

ftp://ftpaccess:Brightpoint1@ftp.uk.im-mobility.com/Technical%20Support/...

This post was written using a lot of reference to Ryan Newington’s post on the same subject:

http://blog.lithiumblue.com/2007/04/accessing-exchange-2007-unified_6743...

This guide assumes that the Unified Messaging role has been installed on the Exchange Server and that the SIPtrix server has been installed on the same local network and there are no firewall restrictions on the local network.

In addition to the Exchange Server and the SIPtrix server, it will also be necessary to download and install the free, open-source sipX product, available from www.sipfoundry.org

The one thing that SIPtrix is not able to do is handle SIP/TCP translation, so sipX can be used as a translation service. Although sipX is an IP PBX in its own right, it does not have the ability to connect to the PSTN, so we will use SIPtrix as the feature-rich PBX, and sipX as the SIP/TCP translation service. I will look at how to install and configure the sipX server in this post.


Servers

In this example, the internal domain is ‘domain.com’

The Exchange Server is ‘exchange.domain.com’ and has an IP address of 192.168.225.128

The SIPtrix server is ‘siptrix.domain.com’ and has an IP address of 192.168.225.129

The sipX server is ‘sipx.domain.com’ and has an IP address of 192.168.225.130

DNS must be configured correctly on all servers so that all servers resolve correctly to the correct IP address. On my network DNS is running on the Exchange server and A-record entries have been added manually for the siptrix and sipx servers. Both the sipx and siptrix server have the primary nameserver set to the address of the Exchange server.

It is necessary to do this rather than simply adding entries in the hosts file on the Linux servers as SIP behaves oddly in terms of name resolution and unless it can receive a response from a DNS query it doesn’t always work as expected.


Configure Dial Plan

The first step is to plan and configure the dial plan to be used internally within the organisation. In this example, internal user extensions on the SIPtrix system are assigned in the 2xx range. The receptionist extension is number 200.

Extensions configured for Outlook Voice Access are assigned in the 4xx range.

We will configure extension 400 as the extension users dial to access Outlook Voice Access, and extension 499 as the number dialled to access the Auto Attendant.

Outlook Voice Access needs to be configured on the Exchange Server for the 4xx extension range. This can be done either in the Exchange Management Console, or at the command line using the Exchange Management Shell.

To configure the dial plan within the Exchange Management Console, browse to Organisation Configuration --> Unified Messaging. Select the option to create a New UM Dial Plan. The following window will be displayed:

Integrating Exchange 2007 Unified Messaging with SIPtrix

Enter a name for the dialplan, such as Outlook Web Access. Set the number of digits in extension number to 3. Click New to save the new Dial Plan.

Once created, edit the properties of the Dial Plan. Click on the Subscriber Access tab and add 400 as the access number:

Integrating Exchange 2007 Unified Messaging with SIPtrix

Click OK.

To do this at the command line, launch the Exchange Management Shell and issue the following command:

new-UMDialPlan –Name:’Outlook Voice Access’ –NumberOfDigitsInExtension:’3’
–AccessTelephoneNumbers 400


Configure Gateway

The Exchange Server must now be configured with the details of the Gateway server to use, in this case the sipX server.

To do this within the Exchange Management Console, browse to Organisation Configuration --> Unified Messaging and select the option to create a New UM IP Gateway, the following window will be displayed:

Integrating Exchange 2007 Unified Messaging with SIPtrix

Enter a name for the Gateway and complete the FQDN of the sipX server. Use the FQDN rather than the IP address for the reasons mentioned earlier. Assign the dial plan you created earlier to the new gateway. Click New to save the changes.

To do this at the command line, launch the Exchange Management Shell and issue the following command:

new-UMIPGateway –Name:’sipX’ –Address:’sipx.domain.com’ –UMDialPlan:’Outlook Voice Access’


Configure Auto Attendant

Exchange can now be configured with the details of the Auto Attendant. To do this within the Exchange Management Console, browse to Organisation Configuration --> Unified Messaging. Select the option to create a New UM Auto Attendant, the following window will be displayed:

Integrating

Enter a name for the Auto Attendant and select the Dial Plan you created earlier.

Add 499 as the extension number used to access the Auto Attendant.

Enable the Auto Attendant and Speech-enable the Auto Attendant.

Click New to save the changes.

To do this at the command line, launch the Exchange Management Shell and issue the following command:

new-UMAutoAttendant –Name:’Outlook Voice Access’ –UMDialPlan:’Outlook Voice 
Access’ –PilotIdentifierList:’499’ –Status:’Enabled’ –SpeechEnabled:$true

The Auto Attendant can now be further configured if required. The receptionist extension can be configured, time conditions can be specified determining when the auto attendant will run, and an address list within the Active Directory can be specified to which callers dialling the Auto Attendant will have access to. To do this within the Exchange Management Console, edit the properties of the Auto Attendant you created earlier. The Times tab allows you to specify when the Attendant will run:

Integrating Exchange 2007 Unified Messaging with SIPtrix

The Features tab allows you to specify more advanced functionality:

Integrating Exchange 2007 Unified Messaging with SIPtrix

To do this at the command line, launch the Exchange Management Shell and issue the following command:

set-UMAutoAttendant –Identity Auto Attendant –AfterHoursTransferToOperatorEnabled $true
–AllowExtensions $true –BusinessHoursTransferToOperatorEnabled $true –CallSomeoneEnabled $true
–NameLookupEnabled $true –SendVoiceMsgEnabled $true –OperatorExtension ‘200’
–ContactScope GlobalAddressList


Configure UM Server

The Dial Plan now needs to be associated with the UM Server to make it active. Launch the Exchange Management Console and browse to
Server Configuration --> Unified Messaging. Edit the properties of the Server and click on the UM Settings tab:

Integrating Exchange 2007 Unified Messaging with SIPtrix

Allocate the Dial Plan you created earlier to the server.

Click on the System Settings tab, verify that the correct Domain Controller and Global Catalogue Servers are defined:

Integrating Exchange 2007 Unified Messaging with SIPtrix

Click OK.

To do this at the command line, launch the Exchange Management Shell and issue the following command:

set-UMServer –Identity:’exchange.domain.com’ –DialPlans ‘Outlook Voice Access’


Enable Users

Now your users will need to be enabled for Unified Messaging and have an extension number associated with them. To do this within the Exchange Management Console, browse to Recipient Configuration --> Mailbox. Right click on a user and select the option to Enable Unified Messaging, the following window will be displayed:

Integrating Exchange 2007 Unified Messaging with SIPtrix

Select the Dial Plan you created earlier and assign a PIN number to the account. Click Next.

Integrating Exchange 2007 Unified Messaging with SIPtrix

Enter the user’s extension number. Click Next and then Enable to save the changes.

To do this at the command line, launch the Exchange Management Shell and issue the following command:

enable-UMMailbox –Identity:’DOMAIN\User’ -UMMailboxPolicy:’Outlook Voice Access’
-Extensions 220 –Pin 9876 –PinExpired $false


Installing and configuring the sipX server

Install CentOS 5.x

During the installation, when prompted disable the firewall and SE Liinux. Ensure to set the hostname to the FQDN of the server.

Remember to set the primary nameserver address to that of the Exchange server (or the server on which the DNS service is running)

Set up the yum repository information for the sipX package with the following command:

wget –P /etc/yum.repos.d/ http://sipxecs.sipfoundry.org/pub/sipXecs/sipxecs-stable-centos.repo

Download and install the required sipX packages with the following command:

Yum –y install sipxpbx sipxconfig sipxproxy sipxregistry

Generate an SSL certificate for the server with the following command:

/usr/bin/ssl-cert/gen-ssl-keys.sh

You will be prompted for a number of pieces of information, including your city, state, country, etc. Be sure to complete the domain and FQDN information correctly.

Install the certificate once generated with the following command:

/usr/bin/ssl-cert/install-cert.sh sipx.domain.com

(where sipx.domain.com is the name of the server you entered during the certificate generation process earlier)

Download the XML flle defining the external gateway and mapping rules:

wget –P /etc/sipxpbx/ http://lithiumblue.com/config/external_mappingrules.xml

Once installed, edit the file with the details of your Exchange Server and number ranges:

 

<?xml version="1.0"
encoding="UTF-8"?>

<mappings
xmlns="http://www.sipfoundry.org/sipX/schema/xml/urlmap-00-00">

<hostMatch>

<hostPattern>${SIPXCHANGE_DOMAIN_NAME}</hostPattern>

<hostPattern>${MY_FULL_HOSTNAME}</hostPattern>

<hostPattern>${MY_HOSTNAME}</hostPattern>

<hostPattern>${MY_IP_ADDR}</hostPattern><userMatch>

<!--ExchangeDialRule-->

<userPattern>4xx</userPattern>

<permissionMatch>

<transform>

<host>exchange.domain.com</host>

<urlparams>transport=tcp</urlparams>

<fieldparams>q=0.9</fieldparams>

</transform>

</permissionMatch>

</userMatch>

<userMatch>

<!--ExchangeVoicemailRule-->

<!--Note this is only to handle diversions
for local sipX 3xx extentions-->

<userPattern>3xx</userPattern>

<permissionMatch>

<permission>Voicemail</permission>

<transform>

<user>400</user>

<host>exchange.domain.com</host>

<urlparams>transport=tcp</urlparams>

<headerparams>Diversion=&lt;tel:{digits}&gt;;reason=no-answer;screen=no;privacy=off</headerparams>

<fieldparams>q=0.9</fieldparams>

</transform>

</permissionMatch>

</userMatch>

</hostMatch>

</mappings>

 

The above rules define that calls for 4xx numbers are sent to the Exchange server, and that sipX will communicate with Exchange using SIP/TCP.

There is also a line defining 3xx extensions, these are local sipX extensions and can be used for troubleshooting purposes.

We now need to download and configure the authrules.xml file to tell sipX that it is responsible for routing calls to the 4xx number range. To download the file, type:

wget –P /etc/sipxpbx/ http://lithiumblue.com/config/external_authrules.xml

Once installed, edit the file with the details of your Exchange Server and number range:

 

<?xml version="1.0"
encoding="UTF-8"?>

<mappings
xmlns="http://www.sipfoundry.org/sipX/schema/xml/urlauth-00-00">

<hostMatch>

<!--ExchangeDialRule-->

<hostPattern>exchange.domain.com</hostPattern>

<userMatch>

<userPattern>4xx</userPattern>

<permissionMatch/>

</userMatch>

</hostMatch>

</mappings>

 

We now need to configure sipX to use these 2 configuration files. Edit the file

/etc/sipxpbx/sipxconfig.properties.in

Locate the line starting:

mappingRules.externalRulesFileName=

and add

/etc/sipxpbx/external_mappingrules.xml

so that the line reads

mappingRules.externalRulesFileName=/etc/sipxpbx/external_mappingrules.xml

Add a new line underneath reading:

authRules.externalRulesFileName=/etc/sipxpbx/external_authrules.xml

Save the file. Reboot the server.

Alternatively, if you are not comfortable installing Linux, you can download a preconfigured sipX virtual machine for use with VMWare from here:

http://downloads.voipjots.com/vms/sipX3.0.zip

and edit the above configuration settings.

Once the sipxpbx service has started, browse to the IP address of the sipx server from a web browser, if this is the first time you are connecting, you will be prompted to enter a PIN number for the superadmin account, you may then login as the superadmin account using that PIN.

Hopefully, the following window will be displayed:

Integrating Exchange 2007 Unified Messaging with SIPtrix

Once logged in, we need to add a gateway to allow sipX to talk to the Exchange server.

Select Devices --> Gateways --> Add New Gateway --> SIP Trunk, the following will be displayed:

Integrating Exchange 2007 Unified Messaging with SIPtrix

Enter a name for the Gateway, such as Exchange. Enter the FQDN of the Exchange server in the address field

Click OK.

Add another SIP trunk for the SIPtrix server, again using the FQDN name of the server in the address field.

Now we need to configure the Dial Plan. Select System --> Dial Plans --> Add New Rule --> Custom, the following will be displayed:

Integrating Exchange 2007 Unified Messaging with SIPtrix

Enter a name for the Dial Plan, such as SIPtrixDialPlan and tick the option to Enable it.

In the Prefix field enter 2 followed by ‘And 2 Digits’ (depending on your internal numbering scheme on the SIPtrix server)

Scroll down to the Resulting Call section. Leave the Prefix field blank and select ‘Entire dialled number’ from the Append field.

In the Gateways section, drop down the menu and select SIPtrix as the Gateway to use.

The new Dial Plan will now be listed:

Integrating Exchange 2007 Unified Messaging with SIPtrix

Move the new dial plan to the top of the list.

Click Activate and then OK to apply the configuration changes.

Now select System --> Domain and verify that the FQDN of the sipx server is displayed correctly. If not, set it. This needs to be same address as the one you specified as the UM Gateway on the Exchange server.

Integrating Exchange 2007 Unified Messaging with SIPtrix

The sipx server is now configured. To test our configuration so far we need to create an extension on the sipx server.

Select Users --> Users --> Add User

Enter 300 as the extension number. Complete the First Name, Last Name, PIN and Password fields. Set the password field to something you will remember as you will need it in a moment.

Click OK.

We now need to verify access to the sipx server from a SIP client, preferably X-Lite from CounterPath: http://www.counterpath.com

Create a new SIP account with the following details:

Integrating Exchange 2007 Unified Messaging with SIPtrix

The client will then hopefully register with the sipx server and indicate that it is ‘ready’:

Integrating Exchange 2007 Unified Messaging with SIPtrix

Dial 300, you should see an incoming call on line 2. This indicates that the sipx server is working as far as SIP communications go.

Now dial 400, you should hopefully hear a recorded message saying “Welcome, you are connected to Microsoft Exchange’. This indicates that the route to the Exchange server for the 4xx number range is working and also that Exchange has recognised the request sent to it by the sipx server.

Because you are dialling from extension 300, and this is not assigned to any user, Exchange will ask you for your extension number followed by your PIN.

When set up properly, Exchange will identify that you are calling from a 2xx extension, match that number to a user account and just prompt for a PIN number.

Now dial 499, you should hopefully be directed to the Exchange Auto Attendant and hear a recorded message saying “Welcome to the Microsoft Exchange Auto Attendant. To reach a specific person, just tell me their name”. if you then speak the name of someone in the directory, Exchange will try to call them. As SIPtrix is not yet configured, we cannot test this yet.


Configuring SIPtrix

By default SIPtrix will use its own internal voicemail system, so the first thing to do is configure it to use the Exchange Server for voicemail. To do this, browse to the SIPtrix admin console from a web browser.

Select Tools --> Config Edit --> Extensions.conf

In the text file that is displayed, locate the section starting [macro-exten-vm]

The line above this section should read something along the lines of:

; ARGS: $VMBOX, $EXT

In this example, $VMBOX can be read in the below section as being $ARG1

Locate the line reading

exten => s,8,Macro(vm,${ARG1},${DIALSTATUS})

and comment it out by adding a ; at the front

Beneath the commented out line, add the following 2 lines:

exten => s,8,SIPAddHeader(Diversion: \;reason=no-answer\;screen=no\;privacy=off)
exten => s,8,Dial(SIP/400@sipx.domain.com|30)

Integrating Exchange 2007 Unified Messaging with SIPtrix

Click Update and then Re-Read Configs

Now we need to configure a SIPtrix Trunk. Browse to Setup --> Trunks --> Add SIP Trunk

Leave all settings blank, apart from, enter a name for the Trunk, such as sipX.

In the Peer Details box, enter:

host=sipx.domain.com

type=peer

insecure=invite

context=from-internal

Click Submit and then Apply Changes.

Now we need to add an Outbound Route. Browse to Setup à Outbound Routes

Enter a name for the Route, such as sipXroute

Leave all settings blank, except, from the Trunk Sequence drop-down menu, select the Trunk you created earlier.

In the Dial Patterns box, type in:

4xx

Which tells SIPtrix to use this route for any numbers in the 4xx range.

Click Submit and Apply Changes.

Now create an extension on the SIPtrix server in the range 2xx and enable voicemail. You will be required to enter a password for the voicemail box, but this can be set to anything as it will not be used.

To verify that SIPtrix is working correctly, reconfigure the XLite client to connect to ‘siptrix.domain.com’ using the 2xx extension and password.

Provided that the client registers successfully, now try dialling 400 from SIPtrix and ensure that Exchange recognises that you are dialling from your 2xx extension (for this to work you will need to have defined your 2xx extension within the properties of your AD user account).

When prompted for a PIN, use the PIN code generated for you by the Exchange Server rather than any PIN you may have configured on the SIPtrix server. Your PIN will have been emailed to you automatically when your AD user account was enabled for Unified Messaging. When you log in for the first time you can then change your PIN. You can also change your PIN within the Voice Options page within Exchange 2007 Outlook Web Access.

Once logged in, you can select between Contacts, Calendar and Email folders by saying the word ‘contact’, ‘calendar’ or ‘email’.

Any unread messages in your Inbox will be read back to you – not the entire message, just the subject followed by the first 15 words or so of the beginning of the message body. You can then choose to ‘delete message’ or ‘forward message’ or move onto the ‘next message’ by saying those commands.

I admit I have only played with this feature briefly and was impressed, but did find that if there is any background noise the auto attendant got confused and there was a lot of "I'm sorry I don't understand that command" so I expect it's brilliant if you're in the car with all the windows shut and the radio off, but not so good if you're on a crowded platform!