CUCM SIP URI Dialing to Lync 2010-This could change your life or at least your dial plan!

While I am not about to promote the use of Cisco’s mobility feature to dual ring a Cisco phone and Lync, there is an interesting feature that could make your life easier if you insist on using it. Its called SIP URI dialing. This isn't a new feature as its been around since 7.x days or possibly earlier. It sparked my interest back in 2008 but I never really investigated it further until recently.
SIP URI dialing is really a pretty basic concept. Instead of using a normal DID route pattern to designate a destination you use a SIP URI such as lyncuser1@home.local. By specifying @home.local as your SIP route you assign a SIP trunk that points to Lync. Its actually pretty simple and works with Cisco’s mobility feature used in Remote Destinations.
There are some caveats with this feature though and its not terribly flexible. It does require some special configuration but could possibly make dial plans and migrations a little easier. Also you can remove the issue of having the same number used on both systems because now that your ringing between systems with a unique SIP URI using the same DID on both systems is much less problematic. So users don’t have to change numbers or use a new number for Lync, it can be the same as their Cisco IP phone.
To make things a little easier to understand, in this post I am referencing the To field in a SIP message when I am talking about Tel URI or SIP URI. I am using Tel or SIP to define trunk routing behavior even though both are configured as SIP trunks when configured in CUCM. Its just the routing behavior based on the address format I am trying to better define. Hope that’s not to confusing.
Why use it?
While working in the field I get a lot of questions from engineers around how do I make my Cisco phone and Lync ring at the same time. As I have covered here on my blog there are a couple of ways to do this from either CUCM, Lync or even potentially from a gateway. But there is a level complexity in regards to how to configure DID’s and how to make DID’s unique enough so that you can route between the two platforms. Well using SIP URI dialing instead of DID’s this simplifies this portion of the configuration and leaves Lync’s Sim Ring feature open for users to configure it for their cell phones. Using Sim Ring as the tool to ring a Cisco desk phone in my opinion is a waste of an easy to configure end user setting. I strongly believe this feature is better used to ring a cell phone or other devices self administered by the user.
Caveats for SIP URI dialing?
The single biggest caveat for SIP URI dialing is that when you create a SIP Route pattern it does not allow assigning a route group to it. You have to directly assign a trunk to the route pattern. The main issue is that once assigned to the SIP route pattern you can no longer assign the same trunk to a route group which limits your options. The best way to deal with this is to have a SIP trunk just for SIP URI routing. In CUCM 8.6 you can have multiple endpoints (in our case mediation servers) assigned within a SIP trunk which means that this isn't a redundancy problem. Its more a configuration issue on the CUCM side but since this configuration is for a specific purpose I don’t consider this a show stopper.
How to set it up?
The easiest way to do the setup is to follow this guide with a few alteration which I will call out below. This is the Microsoft produced guide which I prefer over the Cisco guide. In the Microsoft guide they make use of Calling Search Spaces (CSS) which gives a more complete picture of the settings required. In the Cisco guide there is no call authorization setup so unless you know which CSS to configure you could easily miss a setting as there are multiple places to set CSS on various pages. The one that caught me out was the rerouting CSS on the Remote Destination Profile.
image
What's needed for Lync?
The SIP URI trunk is for inbound use only. This means that setup on the Lync is pretty simple if you already have a SIP trunk setup for your CUCM deployment. As long as your CUCM servers are already added to the topology as gateways you are already done. Just make sure that the inbound SIP URI trunk to Lync is using already established ports. 
clip_image001
How do I configure CUCM?
In my testing I was using CUCM 8.6 so your settings may vary depending on the version you have.
SIP Trunk
The thing with this configuration is that you are creating a SIP trunk for one purpose and that is to ship messages with headers that have the “to” field with a SIP URI format to Lync. So LyncUser1@home.local as an example.
Your Tel URI and SIP URI SIP trunks can share the same SIP Security Profile and outbound ports to Lync but you will need to use different DNS/SRV names or IP address DNS name combinations. So as an example I used:
SIP URI Trunk – FQDN – home-lync-rtm.home.local
Tel URI SIP Trunk – IP Address 192.168.1.160
Below is my trunk configuration for my SIP URI routing with a FQDN for my Lync 2010 Mediation Server.
image
In my case I used a IP address on one trunk for Tel URI calling and the FQDN on the SIP URI trunk. Now if you are not that fixed on configuring route groups and route lists for the SIP trunk connecting to Lync you can configure the trunk directly on both DID and SIP URI route patterns and just have one trunk. I tried both in my lab and it worked either way.
SIP Route
Probably the new piece of configuration to most people will be the SIP route itself. Its pretty easy to configure. See below. I created a domain route to home.local to route my SIP URI traffic that I setup for my users on their Remote Destinations.
image
User Setup
As far as the user setup goes the only variation between the standard setup mentioned in the guide I referenced earlier is to configure the user with a SIP address to route calls in the Destination Number under Remote Destination configuration. In my case I used lync01@home.local as my destination number rather than a DID or other number.
image
This configuration is probably one of the most important interoperability pieces I have written in a while. I can see this alleviating quite a few issue I have come across in the field and hopefully this article will get good circulation so more people know about it.
If folks need more explanation please feel free to post your questions. Cisco’s Unified Mobility can be a pain to setup first time around but funnily enough the Microsoft guide does a really good job of walking through the configuration. I can’t say the same of Cisco’s.
VoIPNorm

Update: I have confirmed this configuration is valid for Lync 2013. I have not fully tested new routing capabilities in 2013 that could simplify this configuration but will update this post when completed.

32 comments:

  1. One issue I see. You say the DID can be the same in Cisco and in Lync but if I'm in Lync and dial another user then only their Lync endpoint will ring. The call will never leave Lync go to Cisco and hairpin for dual ring.

    It seems this is great for users that are either "lync" or "cisco" but not both...

    ReplyDelete
    Replies
    1. Hi Alex,

      You have hit on a common issue even if number are not the same because you can only set Sim Ring or unified Mobility in one place other wise you can get looping. Its not a perfect solution but if you at least make both numbers in each system the same then users dont have to take a number change or get an extra DID. Authentication for conferencing in Lync with Extension and Pin is with a extension they are already used to as well so its an added benifit.

      Using unified Mobility in this fashion is used more than most people realize so using SIP URI dialing is certainly something that will make it a little easier.

      Delete
    2. +1: great post Chris. About 3 months ago I tried using the SIP URI (I had tried to make it work in OCS 2007 R2 but never could) and to my surprise it worked like a charm! We have been using this for about 3 months with a trial group of users (and CUCM 7.x) for inbound dialing and it has worked great - removing the need for specific DID's for Lync.

      Alex - in our deployment our Lync users can dial another users Cisco extension (via right click call 'Work' number), or they can make a pure Lync audio call. As Norm says, not perfect, but this works really well for us.

      Curtis

      Delete
    3. Hello Alex.
      This is actualy quite simple to solve, in conjunction with SIP Uri dialing.
      You need to add ms-skip-rnl on the user LineUri:
      tel:+12345678;ext=5479;ms-skip-rnl

      With this setup the Luync user is able to dial their own Cisco phone with the same number, and also other Lync users who call him using E164 bumber will be routed to Cisco which will ring as well as make the Lync client ring via RDP profile configured with SIP address.

      Delete
    4. Hi anon,

      Very cool info I have not seen this before. Any idea on version constraints on the Lync side?

      Delete
    5. Hello Chris
      This should work with all versions of Lync 2010 - I believe this is used internally by CAC so it is likely it will work in 2013 as well - but I have not checked. If you check routing.am file under Server\Core there it is used in there (in 2010).
      Regards

      Delete
  2. Great post Chris. Any plans to write a definitive guide to integrating PBXs with Lync? What are the options, effects on the users and the challenges?

    We have many customers that have invested in Cisco handsets and want to keep them for a limited time for desk bound workers while using Lync for remote and mobile workers.

    ReplyDelete
  3. Chris - all good points, thanks. Is it possible to create 2-way connectivity using SIP URI's? For example, you have CUCM 8.6 and CUPS/Jabber with a large number of users and migration to Lync is not practical for various reasons. However it makes sense to take advantage of Lync on the edge to federate with 3d parties/MSN/etc. How would you configure both platforms to be able to share IM/P and make voice/video calls without recreating all user accounts in Lync?

    ReplyDelete
  4. Great Post Chris, is it possible to configure Cisco side using bulk administration? instead of user by user configuration.

    ReplyDelete
    Replies
    1. To some degree it can be done with the BAT tool but I am not sure if you can also add remote destinations. Below if the RDP template configuration in BAT.

      http://www.cisco.com/en/US/docs/voice_ip_comm/cucm/bat/7_0_1/t11dstpr.pdf

      This is one of the most complex configurations in CUCM for what it is.

      Delete
  5. thanks Chris, Does this configuration requires additional licensing from Cisco side?

    ReplyDelete
    Replies
    1. IT depends on how you are currently licensed. If you have CUWL you are covered under CUWL but if not it will require 2 DLU's to enable the functionality.

      Delete
    2. Just want to clarify the SIP routing does not require additional licenses, its only the mobility functionality that requires it.

      Delete
  6. Chris,
    Can this be done with CUCM 7.1.3, or only 8.x or higher?

    Thanks,
    Mike

    ReplyDelete
    Replies
    1. And does this require that Lync users have DID numbers prior to using this? Currently, Lync doesn't have any DID numbers assigned (and would be next to impossible to redesign the dial plan because of the willy-nilly way they created it in the first place)

      Thanks again!
      Mike

      Delete
    2. Hi Mike,

      Yes this feature was available in 7.x and yes you do not need to configure a DID on Lync to start out using this feature. You will need to enable enterprise voice though which also means Plus Cal Licensing. Hate to bring up licensing but my ESP was telling me that this may be a question that comes up:)

      One thing to be aware of is if you want users to make outbound calls from Lync you may want to turn on the Trunk Caller ID feature in Lync so that users making outbound calls have a Caller ID as some service providers wont pass a call without an identifiable ID that is associated with the provider service.

      Cheers
      Chris

      Delete
    3. Chris,
      I understand about the licensing issues. We are "covered under ELA" according to my boss so I'm just running mad in the lab at the moment. We had Lync to Cisco working (yea, no number was showing up on the receiving end) but Cisco to Lync has never worked. Looking at your setup now to see if we can get it working.

      Thanks for the reply.
      Mike

      Delete
  7. Cisco to Lync could be any number of issues but most likely is routing in CUCM. Getting Calling Search Spaces and partitions etc can be difficult to setup correctly. Hopefully just using the SIP URI might help you out somewhat.

    ReplyDelete
    Replies
    1. Chris,
      It did. and it's working (at least in the lab anyway). I can't thank you enough for this article, and your help and replies.
      Now to work on getting a number to show when Lync calls the phone, but that's for Monday!

      Thanks again for all your help.
      Mike

      Delete
    2. Chris,
      It's all good now. The VoIP to Lync dial rings both the VoIP phone and the Lync client. We assigned the user a TEL:xxxxxxx number in Lync Control Panel (same as their VoIP phone number) so when a user calls a VoIP phone using Lync, the VoIP phone sees (and can dial back to) the user.

      I can't tell you how much time you saved me with this article (and your replies). Not having to revamp the dial plan really cut down on the deployment time (SMILE)

      Thanks!!
      Mike

      Delete
    3. Hi Mike,

      No problem. Its kind of Cisco's hidden secret that you can do this. I have never really seen it talked about to heavily anywhere, maybe I just didn't look hard enough but it certainly doesn't rate much of a mention in the places I have looked.

      Glad it helped.

      Cheers
      Chris

      Delete
    4. Chris,
      Further testing brought a new wrinkle into the plan. As long as the user's TEL number is in Lync, any Lync->Lync call seem to only ring the Lync client and not the VoIP phone. However without the number in Lync, any outgoing calls to VoIP (CUCM 7.1.5) have no caller-id.

      decisions, decisions, decisions (smile)

      Mike

      Delete
    5. Hi Mike,

      If you read some of the earlier comments we talk a little bit about having to have Lync-Lync calls only hit Lync. One of the draw backs. Also if you want an outbound DID you can configure a trunk DID in the trunk going to CUCM from Lync. Although this isnt the caller ID of the user as such if you dont want to configure a DID for every user in the Lync this is something to fall back on.

      Delete
  8. Great post Chris- quick Q: Can I use Lync attendent to front calls and interwork alongside Cisco UCM using SIP URI dialling?

    Would I just need a DDI/DID number and transfer calls to Lync users and then both Lync client and Cisco phone would ring?

    ReplyDelete
  9. SIP Trunk could be used to work with Voice over IP solution in business establishments. This
    is a solution that utilizes existing wired PBX models for communications for linking traditional telephone networks to external environment through the net

    ReplyDelete
  10. Hi there, a bit of a long shot but we're implementing this with CUCM and OCS 2007 R2 at the moment. We're pretty sure we have it setup okay but when a call comes in we get the following errors on the Mediaiton Server as it tries to initiate the SIP session:

    SIP/2.0 488 MediationCall SetupCall error: MediationCall CreateOutgoingSession error.

    Can't find much about this error so was wondering if you'd seen it?

    Ta!

    Matt

    ReplyDelete
    Replies
    1. HI Matt,

      I never tested this with OCS R2 so I haven't seen this error. Have you tried sending a normally formatted Tel URI to the mediation server? Are any calls passing through the mediation server?

      Cheers
      Chris

      Delete
    2. Cheers for the quick reply.

      We haven't yet, no. We wanted to get it working with SIP URI if possible. We may well have to use a Tel URI to prove it'll work though. Might be a more fundamental problem I guess than just the SIP URI portion of this.

      Matt

      Delete
    3. So, we tried using the Tel URI today and it worked successfully. It seems the problem is isolated to the SIP URI portion of this. I have raised the issue with PSS to see if they've seen that particular 488 error.

      Thanks...

      Matt

      Delete
  11. This is great for voice calls when you have to run the dual system scenario, but what about Cisco phone presence for the same user that is enabled as EV on Lync?
    All the doco I have found seems to indicate you have to use CUP and RCC.

    ReplyDelete
    Replies
    1. Hi Mike,

      No Presence is exchanged in this design for use by Lync. RCC or CUCiLync are the only answers available today to enable more presence features.

      Cheers
      Chris

      Delete
  12. Great post indeed. The Cisco Lync integration works great!!!

    btw, i have a small issue with dialin when ms-skip-rnl is configured on my account :-(
    Dial the conf number from my mobile phone and create a non-scheduled audio conf as organizer. If i enter my full phone number as configured on the dialin personnal page , it did not accept it. While entering my phone extension worked fine.

    If i remove the ms-skip-rnl from my account, it works both with my full phone number and my phone extension

    Any way to bypass this behavior ?

    Thanks
    Eric

    ReplyDelete

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