Lync Server 2013 Multiple Direct SIP Trunks to CUCM and the Alternate Media IP Setting

Lync 2013 has changed this configuration quite a bit but in a good way. My original post on this subject can be found here. While this method of configuration will still work just fine there are better ways to complete this configuration with Lync Server 2013 but not all of it is as straight forward as looking at the topology builder. As we step through the process you will notice that some settings will require PowerShell. Even though the configuration at first isn't straight forward, it is in essence simpler to manage.

I have also expanded this post to include the configuration required to add remote alternate media IP to a remote site trunk within Lync Server 2013. I thought this was an important configuration to highlight as it is a little bit hidden. Setting the alternate Media IP in Lync Server 2013 requires the use of PowerShell which is new for 2013. For those not familiar with what this is here is a quick overview.

Alternate Media setting in Lync and CUCM MTP relationship

For those new to CUCM and Lync interop here is a post I wrote way back that talks a little about the use of MTP’s with OCS. Little has really changed in relationship as to why you need them and in reality all VoIP vendors have a Media Termination Points of some description in their environment their just called something a little different. As it relates to Lync, Lync has no awareness of MTP’s location or IP address of another system. So for CUCM that has defined a SIP trunk and a set of MTP’s that can be either as software on the CUCM or on a router, Lync has no knowledge of this. Hence the alternate media IP setting under the Lync gateway configuration.

Out of the box Lync assumes that the media and signaling path for a SIP trunk are one and the same just like a gateway. If you have not located the MTP on CUCM Lync has no knowledge of this and by setting the alternate media IP setting in Lync, Lync can effectively ensure that media bypass will work in the correct manner because as we know CAC and media bypass are determined through sites and subnets.

Okay, now we are done with the basics lets move on.

Reasons for Multiple SIP trunks to the same CUCM cluster/Subscriber

There are a couple of reasons to have multiple SIP trunks between Lync to the same CUCM subscriber or cluster. These are:

  1. Remote site MTP control. For a remote site that has its own MTP resources keeping traffic local to avoid hair pinning and sending unnecessary traffic over WAN links. By creating a separate SIP trunk for a site you can control the alternate media IP for media bypass. This means that using a remote MTP doesn’t require any local Lync resources at that site. So no Mediation Server or SBA required at a remote site.
  2. Calling Search space control on the CUCM side. Each trunk can have its own CSS so adding the ability of call authorization from the CUCM platform even though calls are coming from Lync.
  3. Redundant SIP trunks with dedicated MTP resources.

Previously in Lync Server 2010 the main hurdle with configuring multiple SIP trunks to the same gateway or in this case CUCM cluster is the ability to create multiple gateways with the same IP address in the Topology Builder. The work around to this issue was to use DNS  records that resolve to the same IP address. This was a pain if you had lots of remote sites. Imagine managing 150 DNS records all pointing to the same object. Pretty easy to mess up. Well this has improved with Lync Server 2013 and is no longer a requirement.

In my example scenario I have three SIP trunks to my CUCM cluster but my focus will be on RemoteSiteX which is my new Branch site.There are four steps involved in setting up my new site and establishing the remote media termination points to allow media bypass to stay local in Lync. The Cisco UCM configuration really has not changed and so I wont be discussing it in this post. Just know for the remote site you will need to configure its own MTP with a Media Resource Group and List that needs to be applied to the remote site SIP trunk in CUCM.

image

Step 1 – Define the Trunk in Topology Builder

image

You will notice I have three trunks defined but only one gateway. This new setting for Lync Server 2013 makes configuration a lot easier to manage. While it still means you need to create multiple trunk objects you no longer need to create new DNS records for every new trunk. You may have noticed I have specified a different Port for the trunk. This is still a requirement and if you refer to my diagram it shows the same DNS record being used with different ports.

Step 2 – Configure the Trunk for Media Bypass in Lync

image

Now we can setup the trunk inside the Admin UI and enable media bypass. Pretty straight forward not that much has changed here. Take note: Centralized media processing is selected to enable media bypass even though we plan to use an alternate media IP. I have made the mistake of thinking this is not a requirement but it is.

Step 3 – Identify the Trunk ID in PowerShell

This is where we start to add some new configuration. First step is to identify the trunk ID in PowerShell. You’ll notice I said trunk but the ID shows up as a PSTNGateway. Don’t be deceived. Lync builds a gateway object for the trunk because in essence the trunk is performing the functions of a gateway and under the hood it remains a PSTNGateway object. See PS command below:

get-cstrunk : FT Identity

image

Step 4 – Configure Media IP address for new Trunk

Lastly we need to set the alternate media ID which is the remote MTP defined in CUCM. If you are setting the Alternate Media ID this should be done for all trunks defined under the gateway you are configuring.

Set-CSPSTNGateway –Identity PSTNGateway:RemoteSiteX –RepresntitiiveMediaIP “192.168.0.13”

image

If you have multiple MTP’s for the site, you only need to define one and Lync will work out the rest through sites and subnet to ensure media bypass will function correctly.

Verification

Once its all said and done you may want to verify your changes.

get-CSTrunk | FT Identity, RepresentativeMediaIP

image

Hopefully this change in 2013 will make life a little easier for some of you out there.

VoIPNorm

13 comments:

  1. That was a great post Chris! Thank you.

    ReplyDelete
  2. Thanks for describing the new Lync configuration. The information will help many users in upgrading the Lync setting within a very short span of time.
    http://www.Snap.tv/

    ReplyDelete
  3. Hi Chris,
    Just one question
    I have an integrated Lync+cucm in my site
    In another site I have CMexpress with Lync users
    How can I configure this CM express so that the users in that site can use lync client with CM express for external calls

    ReplyDelete
  4. Is it possible to have multiple alternate media IPs on a single trunk?

    ReplyDelete
    Replies
    1. No it is not but if you have a site with multiple MTP's you only need] to define one.

      Delete
    2. I'm working on integrating with Lync from a PBX perspective and need to create HA for both the trunk and media. Would you have any recommendation other than a load balancer?

      Delete
  5. Wonderful blog & good post.Its really helpful for me, awaiting for more new post. Keep
    Blogging!

    ReplyDelete
  6. I'm working on integrating with Lync from a PBX perspective and need to create HA for both the trunk and media.

    ReplyDelete
  7. Lync can effectively ensure that media bypass will work in the correct manner

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. Chris, do you still need to setup the sites and subnet config in Lync in terms of media bypass for this to work or is it sufficient to just do the four steps you call out?
    Thx
    Dino

    ReplyDelete
  10. Hello Chris,

    In your diagram If an inbound PSTN call came in to the remote site user where SIP URI dialing is utilized (ringing both Lync and Cisco phone simultaneously), would the media still stay local if Lync client answered phone call ? Is there a need to create a direct SIP connection between the Mediation Server at Data Center and the ISR router at the remote site ? The objective is not to deploy any Lync servers at the remote site if possible. Thanks in advance for your time.

    ReplyDelete
  11. Hello Chris. I used your article to create multiple trunk for bypass and no bypss (no bypass so we are able to record the receptionist calls)
    But it was OK for lync to PSTN calls.
    For calls from PSTN to LYNC, it was never Bypass.
    I found the solution( I think), I set a different port on the mediation server for each trunk. Because I think that Lync doesn't know from which trunk the call come so it takes the global setting that is no bypass.

    ReplyDelete

Note: Only a member of this blog may post a comment.