Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
This chapter is part of the Microsoft Lync Server 2010 Resource Kit book that is currently
being developed. Chapters will be available for download while this book is being completed.
To help us improve it, we need your feedback. You can contact us at
nexthop@microsoft.com. Please include the chapter name.
For information about the continuing release of chapters, check the DrRez blog at
http://go.microsoft.com/fwlink/?LinkId=204593.
Contributors
Project Manager: Susan S. Bradley
Content Architect: Rui Maximo
Chapter Lead: Taimoor Husain
Technical Reviewers: Kam Toor, Ken Araujo
Lead Editor: Kelly Fuller Blue
Art Manager: Jim Bradley
Production Editor: Kelly Fuller Blue
Table of Contents
Contributors............................................................................................................... 4
Introduction................................................................................................................ 6
Requirements of Direct SIP from Lync Server..........................................................6
Scenarios.................................................................................................................... 7
Inbound Calls to Lync Server................................................................................... 7
Outbound Calls from Lync Server............................................................................ 8
PBX User Joining Lync Server Audio Conference....................................................10
Direct SIP with Media Bypass................................................................................11
Direct SIP with Simultaneous Ringing....................................................................12
Direct SIP Configuration............................................................................................ 14
Lync Server Configuration..................................................................................... 14
Cisco Unified Communications Manager Configuration.........................................19
Dial Plan................................................................................................................... 23
Outbound from Lync Server...................................................................................24
Summary.................................................................................................................. 30
Introduction
When Microsoft Lync Server 2010 communications software is deployed in an enterprise
environment that already has telephony infrastructure, some level of interoperability is
required. This allows users and devices on the existing infrastructure to communicate with
Lync Server 2010 users and devices.
Within the telephony environment of an enterprise, it is not uncommon to have multiple
communications systems deployed to accommodate the voice workload. Such a system is
called a PBX (Private Branch Exchange). Some legacy Time Division Multiplexing (TDM) PBX
systems can be upgraded to support IP connections. Such a system is called IP-PBX. Legacy
systems and IP-PBX systems form the telecommunications infrastructure for the enterprise.
Direct SIP is referred to as a SIP trunk between an IP-PBX and Lync Server. Because SIP is a
standards-based protocol, communications between endpoints on either the IP-PBX or the
Lync Server call control plane can be provided by using direct SIP. It can also be used to
enhance the existing telephony infrastructure by extending Microsoft Lync 2010 features
such as dial-in audio conferencing and Response Groups to the IP-PBX.
Codec selection and media flow considerations are covered later in this chapter.
Scenarios
Figure 1 shows direct SIP connectivity between Lync Server and Cisco Unified
Communications Manager (CUCM).
a reverse number lookup (RNL) to find the SIP URI of the user. The Front End pool
determines the registered endpoint or endpoints of the called user, and then routes
the SIP INVITE to those endpoints.
6. After the callee accepts the call, the media path is directly established between the
Lync 2010 client, the Mediation Server, and CUCM to the IP phone. In the case where
media bypass is configured, the media path would bypass the Mediation Server and
directly connect from the Lync 2010 client to CUCM
the INVITE to the Mediation Server that is associated with the IP-PBX. The Mediation Server
sends the call through the direct SIP (also referred to as SIP trunk by CUCM) connection to
the IP-PBX, where the call is sent to the appropriate IP-PBX phone. The following steps
describe how the outbound call is established as shown in figure 3.
1.
2.
3.
4.
5.
When the call is established, the Mediation Server and CUCM will exchange the Session
Description Protocol (SDP) to negotiate media capabilities and establish a media path. After
the call is answered, media begins to flow.
Note. Figure 3 shows CUCM acting as the Media Termination Point (MTP) resource for the SIP trunk. Its
possible by using media bypass for the media to flow directly between Lync 2010 and CUCM. This is
covered later in this chapter.
There are some use cases where media bypass is very helpful in both reducing network
utilization and optimizing media paths. An example of this is shown in figure 5. Here, the
Lync 2010 user calls the IP-PBX phone that is connected to the CUCM cluster. Using media
bypass, the media traffic flows directly between the Lync 2010 client and CUCM before
reaching the IP-PBX phone. As a result, the media doesnt need to traverse the WAN. A
more optimum (local) media path is established directly with the IP-PBX (that is, CUCM).
to the IP-PBX by using the Mediation Server across the direct SIP connection as shown in
figure 6. It illustrates CUCM as the IP-PBX.
Note. The call is being answered on the IP-PBX phone while the media flows from the PSTN gateway, to
the Mediation Server, and then to CUCM.
Configuring the IP-PBX to send and receive SIP signaling and media traffic to and
from the Mediation Server.
Configuring the Mediation Server to send and receive signaling (SIP) and media
(real-time system protocol (SRTP)) traffic to and from the IP-PBX.
IP-PBX products that are qualified to interoperate with Lync Server for direct SIP are listed
in the Microsoft Unified Communications Open Interoperability Program at
http://go.microsoft.com/fwlink/?LinkID=187781.
This section covers direct SIP configuration of Lync Server with CUCM as one of the qualified
IP-PBX.
Before configuring direct SIP, it is very important to have a dial plan structure defined
between Lync Server and the IP-PBX. Typically, the IP-PBX supports a shortened dial plan,
with extensions that are often a subset of the users DID. There may also be variable length
extensions and internal numbers that need to be routed to and from the IP-PBX.
In Lync Server, best practice is to use a dial plan that is based on the E.164 standard. This
allows easier routing and troubleshooting as well as a scalable model for growth. It is best
practices to represent numbers in an E.164 format (External DIDs as well as internal
extensions, which are both covered later in this chapter).
We will look at the individual configurations of Lync Server and CUCM trunk set-up, dial plan
considerations, and call routing.
CUCM must be added in Topology Builder as a PSTN gateway. PSTN gateway is the
generic term to refer to IP-PBX and other gateway devices.
The topology must be published to Central Management store.
After the PSTN gateway (that is, CUCM) is added to the topology, it appears in the Lync
Server Control Panel. The first thing to do is to add a trunk to the IP-PBX (that is, CUCM) as
shown in figure 7.
Select Pool trunk, and then select the CUCM from the list that appears
On the Trunk Configurations tabbed page, configure the following parameters:
Enable refer support must be turned off. CUCM neither supports nor handles
REFER correctly. REFER cannot be enabled with media bypass.
The RTCPCallsonHold and RTCPActiveCalls parameters must be turned off.
Real-time transport control protocol (RTCP) is a control channel that uses the
same RTP channel to monitor the network-specific conditions of the real-time
transport protocol (RTP) channel. CUCM doesnt support RTCP. If these variables
are not disabled, the Mediation Server expects keep alives for the RTCP channel
from CUCM, which may cause unexpected behavior. The RTCP parameters are not
displayed through Lync Server Control Panel and have to be configured by using
Windows PowerShell: Set-CsTrunkConfiguration -Identity site:{site name}
-EnableBypass $True -RTCPActiveCalls $False RTCPCallsOnHold $False
EnableSessionTimer $True
You can also configure translation rules and number manipulations for the trunk,
enabling you to change called-party dialed number identification server (DNIS)
information going out the trunk. This is useful if the terminating device of the trunk
is accepting numbers in a particular format.
Note. Enabling Call Admission Control is optional and does not affect the operation of Media Bypass. It is
recommended as a best practice to enable Call Admission Control to prevent media over-subscribing of
WAN links.
After the trunk is configured, routes can be configured to route PBX extensions to the trunk
to CUCM. If PSTN connectivity is configured through CUCM, calls to PSTN from Lync 2010
can be routed to CUCM through the trunk.
For example, the phone number range for Contoso is from +14085550XXX through
+14085559XXX. These numbers must be routed to CUCM by creating a new voice route.
This configuration is done using a regular expression as shown in figure 10.
A SIP trunk must be added to CUCM that routes calls to the Lync Mediation Server (that is,
a pool if the Mediation Server role is collocated).
Enabling the Media Termination Point Required check box has a couple of considerations
to be aware of. MTP resources can be required in some scenarios; for example, DTMF relay
methods cannot be negotiated or a codec selection doesnt match on the endpoints.
Beginning with CUCM version 5.x, MTP resources can be dynamically allocated if any of the
previous circumstances occur.
CUCM, by default, does only Delayed-Offer for outbound calls on a SIP trunk. To do early
media on outbound calls (that is, Early-Offer), Media Termination Point Required must
be enabled. Although Early-Offer is not required by the Mediation Server, Early-Offer is
required for media bypass and enabling Early-Offer is best practice because there are call
flows that may be affected by delayed media. Additionally, mid-call updates may also be
adversely affected (dropped or unable to connect) for some call flows, especially those that
invoke supplementary features.
Figure 14. Set Destination Address and SIP Trunk Security Profile
Set Device Security Mode to Encrypted. This ensures that CUCM uses TLS to
communicate with the Mediation Server.
Set Incoming Transport Type to TLS.
Set Outgoing Transport Type to TLS.
Set Incoming Port to 5061.
The CUCM SIP trunk configuration is now complete. The dial plan can be defined to route
inbound and outbound calls between the two systems.
Dial Plan
Dial plan is an important part of creating interoperability between two telephony systems.
Each systems dial plan must not conflict with the other systems dial plan, and must adhere
to inbound and outbound requirements of the other system. A direct SIP implementation
has the same dial plan considerations.
This section covers an example of the Contoso dial plan and outlines what is required to
implement this dial plan in each system. Figure 16 represents the Contoso dial plan.
This E.164 phone number is then matched to a voice route defined in Lync Server by the
administrator. This voice route is configured to route the call to CUCM.
The dialed number matches the pattern that is defined in the voice route, and then
Mediation Server sends a SIP INVITE to CUCM (defined as HQ-PstnGateway-1) through the
Mediation Server with the TO: header set to the called number, +14255550135.
After CUCM receives the call, it needs to route the call to the IP-PBX endpoint. Because
Contoso is using Cisco Unified Communications Manager 7.x, CUCM is E.164-compliant and
therefore can accept the plus sign as a character in a called/calling party number. The
Mediation Server doesnt need to strip the plus sign from the number before sending it to
CUCM. However, Cisco Unified Communications Manager versions prior to 7.x arent E.164compliant and are unable to route phone numbers preceded by a plus sign. For versions of
CUCM earlier than 7.x, there are two options for removing the plus sign before routing the
call to CUCM.
Option 1
The plus sign can be stripped off by the Mediation Server before the call is sent to CUCM. It
is then able to route the call to the destination IP-PBX phone. This is the most
straightforward method to route calls to Cisco Unified Communications Manager versions
prior to 7.x.
To manipulate the called party number before routing it to CUCM, specify one or more
translation rules on the trunk configuration as shown in figure 18.
Figure 18. Translation Rule on a trunk for removing the plus sign
Alternatively, you can also use the Windows PowerShell parameter RemovePlusfromURIby
using Set-CsTrunk. That removes the plus from the automatic number identification (ANI)
and DNIS before sending it out on the trunk.
Option 2
You can configure the CUCM trunk to consider only the last 11 digits of the called number.
This is done by setting the Significant Digits parameter in the Inbound Calls section of the
Trunk Configuration as shown in figure 19.
This configuration option is not recommended because its a static configuration on the
trunk and doesnt work if you allow variable length phone numbers (that is, extension
numbers, international numbers, and non-U.S. numbers) across the trunk.
CUCM also needs to be configured to route the call after it receives it on the trunk. CUCM
uses the concept of Calling Search Spaces and Partitions. It enforces which directory
numbers, route patterns, or translation patterns can be reached by the trunk. This is
important because it puts the trunk in its own dialing domain.
A Calling Search Space should be created that contains a partition with various translation
rules. They are responsible for converting the number to a format that can be routed by
CUCM, whether the number is to an endpoint extension or to PSTN. This is similar to the
concept of normalization on Lync Server. This is shown in figure 20.
In the Contoso example, the plus sign is used in the translation pattern because a full E.164
number is sent to CUCM for processing. Translation rules also have a Calling Search Space
(calling domain). Each translation rule, after it translates the number to the appropriate
format, contains a Calling Search Space that contains the phones partition for routing to the
phone endpoints or partitions that contain route patterns that route to the appropriate PSTN
gateways.
Summary
Direct SIP is the most straightforward way to achieve interoperability between an IP-PBX
and Lync Server. Direct SIP provides a standards-based interface for signaling and media for
audio communications. Direct SIP supports the following use cases:
Use Simultaneous Ring feature on IP-PBX or Lync Server to ring both IP-PBX handset
and Lync 2010
Call from IP-PBX handset to Lync 2010
Call from Lync 2010 to IP-PBX handset
Call from IP-PBX handset to dial-in conferencing on Lync Server
Call from IP-PBX handset to Lync Server Response Group
PSTN access for Lync Server through IP-PBX