Sunday, February 14, 2010

Exchange Unified Messaging Setup Guide

This post covers Exchange 2010 Unified Messaging and can be seen as a beginners guide to help administrators understand the various components that make Unified Messaging work along with a step by step guide on getting it up and running. This post also applies to many of the components of Exchange 2007 Unified Messaging as well as they work the same in many ways.

What is a UM Dial Plan?

A UM Dial Plan establishes a link from the telephone extension number of a Microsoft Exchange recipient in Active Directory to a UM-enabled mailbox.

Dial Plans is an organization-wide configuration meaning it applies to every domain in your exchange organisation (active directory forest).

When you setup a dial plan you need to configure:
- Number of digits in the extension numbers
- the Uniform Resource Identifier (URI) type
- the VoIP security settings for the dial plan.

When you create a UM Dial Plan, a UM mailbox policy is also created by called DialPlanName Default Policy.

The Dial Plans represent sets or groupings of IP PBXs that share a common user extension. All user extensions on a PBX must contain the same number of digits. A UM dial plan mirrors a telephony dial plan. A telephony dial plan is configured on PBXs or IP PBXs.

In these telephony networks, there could be two users in Active Directory who have the same telephone extension number. UM dial plans resolve this situation. You can put the two users into two separate UM dial plans. This makes their extensions unique. A user can be a member of only one UM dial plan. You can also use a UM dial plan to establish a common set of policies for a group of users. For example, you can enable different languages for different UM dial plans, or you can enable different features for different UM dial plans.

So what is the Uniform Resource Identifier Type?

A Uniform Resource Identifier (URI) is a string of character's that's used to identify the person. A URI defines the naming and numbering format used for calling people contained within a Session Initation Protocol (SIP) header for the incoming and outgoing call. As mensioned above you configure this on the dial plan. Exchange Unified Messaging has three format types or (URI types) that can be used when configuring dial plans:
- Telephone Extension
- E.164

Telephone extension is the most common format used... ie a company may own the phone numbers for 099431xxxx where each user inside the organisation is given a 4 digit extension. Your users would then each have an extension such as 4931. If your Voice Gateway or IP PBX talks with just "Telephone Extensions" inside the SIP protocol then this would be the choice to pick.

However your Voice Gateway or IP PBX may talk something such as E.164 which is the full phone number internally such as "+61 9 9431 4931". With E.164 your voice gateway would be throwing "+61 9 9431 4931" at the Unified Messaging dial plan instead of "4931".

You just need to ensure your Uniform Resource Identifier matches the configuration of your Voice Gateway.

What is the UM Mailbox Policy?

At least one UM Mailbox Policy is required to enable users for unified messaging. UM Mailbox Policies are used to set Unified Messaging settings for UM-enabled users such as:
- PIN Policies
- Dialing Restrictions
- Other general UM policies you want applied to your users.

As mentioned above when you create your first dial plan a UM mailbox policy is also created by called DialPlanName Default Policy. Every UM Mailbox Policy must be linked to only one Dial Plan. Dial Plans get applied to mailbox users through the mailbox policy. However multiple mailbox policies can be linked to a single dial plan in a one to many relationship if you wish to have different PIN policies, dialing restrictions etc for different users.

Each UM-enabled user MUST be linked to a single mailbox policy. When you enable a user for unified messaging it asks you which mailbox policy you wish to use.

What are UM IP Gateways?

An IP Gateway in unified messaging establishes a logical link between unified messaging and the IP gateawy or IP PBX. It is an object that sites in Active Directory that contains one or more Hunt Groups and other UM IP Gateway configuration settings.

Each UM IP Gateway object "Represent" one physical device, an IP Gateway or an IP PBX.

It is the UM IP Gateway object and UM Hunt Groups that establish the link between the hardware IP gateay device and the UM dial plans... so it looks like this:

Hardware IP Gateway Device --> UM IP Gateway --> UM Hunt Groups --> UM Dial Plan --> UM Mailbox Policies

It is possible to associate a single IP Gateway with multiple Dial Plans.

After you create a UM IP Gateway object, the Unified Messaging server associated with the UM IP gateway will send a SIP OPTIONS request to the IP gateway to ensure that the IP gateway is responsive. If the IP gateway doesn't respond to the SIP OPTIONS request from the Unified Messaging server, the Unified Messaging server will log an event with ID 1088 stating that the request failed.

Before an IP gateway can be used to process calls, a UM IP gateway must be associated with at least one UM dial plan. Also, at least one Unified Messaging server must be associated with at least one UM dial plan.

A Unified Messaging server communicates only with IP gateways or IP PBXs listed as a trusted SIP peer.

By default, IP gateways are left in an enabled state after they're created. However, the UM IP gateway can be enabled or disabled. If you disable a UM IP gateway, it can be in one of two disabled modes. The first disabled mode forces all associated Unified Messaging servers to drop existing calls. The second disabled mode forces the Unified Messaging server associated with the UM IP gateway to stop handling any new calls presented by the IP gateway.

What are Hunt Groups? Then how do they apply to Unified Messaging?

Before we relate to Unified Messaging lets clarify what a hunt group is.

Hunt group is a term used to describe a group of Private Branch eXchange (PBX) or IP PBX resources or extension numbers that are shared by users. Hunt groups are used to efficiently distribute calls into or out of a specific business unit. For example, a PBX or IP PBX might be configured to have 10 extension numbers for the sales department. The 10 sales extension numbers would be configured as one hunt group. In a PBX or IP PBX, hunt groups are used to efficiently locate an open line, extension, or channel when an incoming call is received.

In a telephony network, a hunt group is defined as a set of extension numbers grouped as a single logical unit. When an incoming call is received, the PBX or IP PBX uses the hunt group or group of extensions that are defined to hunt for an available or open line, extension, or channel that can be used to receive the call.

There are multiple algorithms or methods that have been created to be used by a PBX or IP PBX to define how the open line, extension, or channel will be located. These include:
- Round robin
- Most idle
- Start with lowest number

Creating and defining a hunt group in a PBX or IP PBX minimizes the chance that a caller who places an incoming call will receive a busy signal when the call is received.

Hunt groups are contacted by things called "Pilot Numbers".

In a telephony network, a PBX can be configured to have a single hunt group or multiple hunt groups. Each hunt group created on a PBX must have an associated pilot number. The PBX uses the pilot number to locate the hunt group and in turn locate the telephone extension number on which the incoming call was recieved. Without a defined pilot number, the PBX cannot locate where the incoming call was recieved.

A Pilot number is the address or location of the hunt group inside the PBX. A pilot number is generally defined as a blank extension number or one of the extensinos inside the hunt group that doesn't have a person or telephone associated with it. For example you configure a hunt group on a PBX that contain extension numbers 4100, 4101, 4102, 4103, 4104 and 4105. The pilot number for the hunt group is configured as extensions 4100. When a call is recieved on the extension number 4100, the PBX looks for the next number to determine where to deliver the call - in this case one of the following 4101, 4102, 4103, 4104 and 4105.

Using a pilot number helps eliminate busy signals and helps route incoming calls to the circuits that are available. The pilot number is used as the target for Exchange Unified Messaging. So on the PBX when a call is recieved for a hunt group of numbers that "unified messaging users" it will have a pilot number that directs the request to a Unified Messaging server's IP address or UM cluster IP address.

So now we know what hunt groups are and how they work, what needs to be configured in UM?

The UM hunt group is a logical representation of an existing PBX or IP PBX hunt group, so you need to make sure these match up exactly.

UM hunt groups act as a connection or link between the UM IP gateway and the UM dial plan as shown above.

Hardware IP Gateway Device --> UM IP Gateway --> UM Hunt Groups --> UM Dial Plan --> UM Mailbox Policies

Unified Messaging hunt groups are used to locate the PBX or IP PBX hunt group from which the incoming call was received. A pilot number defined for a hunt group in the PBX or IP PBX must also be defined within the UM hunt group. The pilot number is used to match the information presented for incoming calls through the Session Initiation Protocol (SIP) signaling message information on the message. The pilot number enables the Unified Messaging server to interpret the call together with the correct dial plan so that the call can be routed correctly. The absence of a hunt group prevents the Unified Messaging server from knowing the origin or location of the incoming call. It is very important to configure the UM hunt groups correctly, because incoming calls that don't correctly match the pilot number defined on the UM hunt group will not be answered, and incoming call routing will fail.

When you create a Unified Messaging hunt group, you are enabling all Unified Messaging servers that are specified within the UM dial plan to communicate with an IP gateway. If you delete the UM hunt group, the associated IP gateway will no longer service calls with the specified pilot number. If the IP gateway is left without remaining UM hunt groups, the IP gateway will be unable to handle incoming calls.

What are Auto Attendants?

Auto attendants help internal and external callers locate users or departments that exist in an organization and transfer calls to them - they basically route calls to the correct location. Think of an auto attendant as a receptionist.

Unlike other Unified Messaging objects, such as UM dial plans and UM IP gateways, you aren't required to create UM auto attendants.

I generally do not like dealing with Auto Attendants. As an end user I prefer speaking to a receptionist instead of listening to a computer saying press 1 for claims, press 2 for billing enquiries, press 3 for technical support. I find it very annoying! However if your company does want to cut costs and implement an auto attendant in unified messaging instead of hiring a receptionist(s) please see this Microsoft technet link for more information how this works:

What order do I setup the Unified Messaging Components?

Setup the unified messaging components in this order:

- Dial Plans
- Mailbox Policies
- IP Gateways
- Hunt Groups
- Auto Attendants
- Add the UM Servers
- Enable Users for UM

Can you show me how to setup Unified Messaging?

Sure - below we will go through the setup of a stand alone (non clustered) unified messaging server using powershell. I am not going to go through the actual installation of the unified messaging role on a server as this is just next... next... next etc.

For all the commands below you can view all the syntax by typing get-help command -detailed. For example:

Get-Help New-UMIPGateway -Detailed

Step 1

Setup the UM Dial Plan:

New-UMDialPlan -Name "Corporate Dial Plan" -NumberOfDigitsInExtension 4 -GenerateUMMailboxPolicy $true -UriType TelExtn

Step 2

Setup the UM Mailbox Policy. Above we specified "Generate UM Mailbox Policy" with true. This creates a default mailbox policy. We can view this by running:

Get-UMMailboxPolicy | fl

If you wish to change any of these values you can use:

Set-UMMailboxPolicy -AttributeName "value"

Remember if you want help on what all these attributes mean you can use:

Get-Help Set-UMMailboxPolicy -Detailed"

Additionally you can create new mailbox policies and link them to your Dial Plan by using:


Step 3

Create the IP Gateway. Remember we mensioned above that the IP Gateway needs to be linked to a Dial Plan... so we need to link it to "Corporate Dial Plan".

New-UMIPGateway -Name "Cisco Unified Communications Manager 7.1.3" -UMDialPlan "Corporate Dial Plan" -Address

Step 4

Create the hunt group(s):

New-UMHuntGroup -Name "Corporate Hunt Group" -PilotIdentifier "1000" -UMDialPlan "Corporate Dial Plan" -UMIPGateway "Cisco Unified Communications Manager 7.1.3"

Step 5

Add the Unified Messaging Server to the Dial Plan. I set a MaxCallsAllowed to 20 in this instance.

Set-UMServer -Identity servername -DialPlans "Corporate Dial Plan" -MaxCallsAllowed 20

Step 6

The last step is to enable users for unified messaging. You can use power shell or the console for this. To use powershell use:

Enable-UMMailbox to enable

Disable-UMMailbox to disable

However service desk are generally going to be doing this so I will show you how to use the Exchange Management Console:

Open the management console, expand recipient configuration --> mailbox. Right click the user you wish to enable unified messaging for and click "Enable Unified Messaging":

Specify the Unified Messaging Mailbox Policy we created above. I suggest Automatically generating the PIN. Unified Messaging sends an email to the user giving them their PIN.

"Automatically Generated Mailbox Extension" grabs it from the IP Phone attribute on the users user account in AD.

Alternatively you can "Manually entered mailbox extension" which is what we are going to do here.

Step 7

Set your UMDialPlan Audio Codec. This could have been done when creating the dial plan but I didnt set it... so by default it made it WMA. However the Cisco Unified Communications Manager 7.1.3 uses G711 so you can simply change it by typing:

Set-UMDialPlan "Corporate Dial Plan" -AudioCodec G711


  1. and the config on the CUCM side?

  2. hi,

    i'm madushka from Sri lanka .we have done exchnage 2010 n its up n runinng.same server i've install UM role. configured in cmdlne.

    n i dnt no what is the properway to install certificate with CA ..everything done in VM environment ..

    n second this is my environment have OCS2007R2(frontend server only)up n Running..its my UMIPGATEWAY this correct ? and also ,do we need to configure AUTOATTENDENT