Join Teams work meetings from Microsoft Teams (free) and vice versa

Microsoft Teams (Free) users can currently join Teams for work (or school) meetings only as guests, which requires them to use a browser and results in a sub-optimal experience. The new feature rolling out will allow these users to join Teams for work (or school) meetings in one click, without being redirected to the browser or asked to fill in their name/surname. They will also be able to continue collaborating with the meeting organizer and other participants via meeting chat after the meeting.  The feature will work in the opposite way as well, so Teams for work (or school) will just as easily be able to join meetings hosted by a Teams Free user with one click. This is associated with Roadmap ID: 167326

Microsoft Lync Server 2010 with CUCM 8

Many of my customers already have an existing PBX in their environment, and do not necessarily want to swap entirely to MS Lync Server as the only telephony platform(or the previous OCS2007 R2).

One way to implement Lync server with the enterprise voice feature for end users, is to make it co-exist with the already existing PBX. There are quit a few documents out there, describing such integrations. But I couldn't find any for my particular case. So here is my way of doing an integration between Lync and CUCM8.

First of all; Some of the customers are fairly small, and can not justify the investment in a full scale enterprise topology. They only want to keep to the minimum - Standard edition server. What's great about the Lync SE is the support of a co-located mediation server. And as long as the clients can have a direct ip connectivity to the gateway, and the gateway supports the media bypass (Cisco will refer to this as "media flow-around) you can get away with only one server (for internal purposes).

To answer the important question; does CUCM 8 support media bypass? Yes it does. At least in my lab.

This guide is not a step by step guide, but a collection of settings on what I did to make it work. Refer to the documentation on exact steps to accomplish your task if you are inexperienced in any of the subjects.

Here is the way I configured both the Lync server and the CUCM to make this happen:

1: In topology builder, add the CUCM8 ip-address as the gateway in your system (ps: make a note of ports and protocols in this view):


2: Enable Mediationserver co location on the Front end server, and point it to the gateway created in step 1 (ps: make a note of ports and protocols in this view) :


When these steps are completed, they need to be published to the Configuration store for tou to do anything more.

The next steps are all done in the CSCP consol
3: Dialplan and Normalization
Everybody needs a Dial-plan configures to make calls. In a small environment (such as my lab) you can get away with using the default "Global" Dial-plan. In this Dial-plan you must have normailzation rules (unless you expect everyone (I mean everyone and everything) to dial using the full e.164 format of +%countrycode%%extention%).

I based my two normalization rules on the end-users dialing habits, and how I expect the called party to be displayed when coming from CUCM. (note: 0 is used as PSTN access code)


4: Voice policy, Pstn usage and routes,
Now then, the following steps can be configured in different manners. But (again) in my simple deployment I decided to follow these steps.

4-1; Enable the Media Bypass in network configuration


4-2; Add a pool (or site) trunk to your configuration


4-3; Configure Media bypass on the trunk, and create translation patterns as needed.
Why? Well, not all gateways will accept the + as an incoming number, ans in a large enterprise you might have different dialing rules in different locations. In my setup, I have made sure the called number (which is what we translate) is exactly identical to how numbers appear when users dial from the CUCM itself. This way, I will make use of the existing dialplan on the CUCM for outgoing calls, and only create a tiny translation pattern for call local to the PBX. == A minimum of configuration changes for CSS, PT's and TP's needed on CUCM when we get there)


4-4; Use the Global Voice Policy, and add a new PSTN Usage



4-5; In the PSTN usage, create a route (Note: I only need one route, as everything was previously normalized)


4-6; Point the rout to the PSTN gateway/Trunk


4-7; Test Voice routing in the CSCP, and verify that everything is acting the way you intended it to


5; Enable a user for Enterprise voice, and assign policies.
Note that all the policies and usages are set to automatic in my scenario. They are set based on:
- Some usages are global = as long as you are enabled, and no more specific rules are set they apply to you.
- Some usages are based on site = in which site you belong (have not touched on site in this post)
- Some settings are based on pool = which pool is your account logged in to


That's it for the Lync Server configuration.

Now, let's head over to the CUCM.
If you have been paying attention, you will soon realize Microsoft has changed default ports for the SIP signalling traffic. There used to be a "standard" using TCP 5060 or 5061 on sip-trunks. But as the Lync sever is growing ever more scalable and now supports multiple gateways, a limitation in just using 5060 and 5061 would soon create an issue in many environments.

In CUCM, the default listening port is 5060 for sip trunks and this does not at all match with the settings from figure 1. One way to fix this is to alter the configuration in figure 1 to match the CUCM of port 5060. The other way is to set up a sip profile on the CUCM side to match the incoming connection of TCP 5066, as shown here.

6: Creating a Sip Security Profile in CUCM.
Logged into the CUCM administration site, Go to "System > Security > Sip Trunk Security Profile". If you don't see any profiles here, click "find". Then go to the "Non secure sip trunk profile". Copy this, and edit the port number. You may also select the check-boxes I have.


7; Taking care of incoming calls, and routing them the correct way.
As my CUCM is a fully functional PBX with an existing setup, there is very little I have to do. But I'll explain the basic configuration here.
In my system I have a Calling Search Space (CSS) named CSS-International which I will use wit the Sip trunk. This CSS sees all my partitions (and all my route patterns) in the system. Since we in step 3 made sure the "called party" would be similar to the way users dial from their CUCM phones, we already have patterns matching the 0xxxxxxxx (actually it will match anything from 0xxx to 0xxxxxxxx) and 000xxxxxxxxxx patterns necessary to route the call to PSTN.
When selecting the CSS-International (better name would have been CSS-Unrestricted) on the Sip trunk, all I have to to is to create a translation pattern for my internal numbers. This would translate an incoming number from 0xxxxyyyy to yyyy (which will match the 4 digit extension numberplan on CUCM). This TP could be configured in any partition (as the CSS used here sees all). But I preferred to create it in the "phones"PT, where all my internal DN's are. You should use a Translation pattern, not a transformation pattern as I have in my screenshot. Though the basic translation will look the same.

8; Finally create the SIP Trunk.
When Configuring the trunk, don't forget the following:
- Inbound call CSS = unrestricted (In my case CSS-International)
- Significant digits = all
- Sip trunk security profile = The one you just created
- Destination port = match the one created in step 2 (default 5066)
- Codec = 711ulaw
- DTMF Siganlling = RFC2833
In addition, You'll see I have checked the "MTP Required" checkbox. This is to make sure the CUCM always have a MTP available for supplementary services. It is not a requirement, but not a bad thing to set ;)





That's it. I hope this article will help you in your lab or at a customer site.

Like this post

Comments

Tore Skancke said…
Bra artikkel dette, Lasse. Kjekt å lese litt om den nye Lync:)

-Tore Skancke
Joachim Farla said…
Good stuff Lasse! Keep up the good work.
Edouard Li said…
Your post is very interresting but I can't see where you configure Media bypass on Call Manager.
You just enter the mediation server address on the Sip Trunk configuration.
Consequently all the RTP stream will pass by the mediation server and not directly to the Call Manager. The feature Media flow arround need to have a Cisco Router named Cube.

In my lab the media bypass feature doesn't work because the Call Manager cannot use wildcard mask for destination address.

Did you make some captures to verify that Lync client communicate directly with CUCM 8 ?

Thank You for your work.
Hi,

Thanks Tore and Joacim, for the comments.

Edouardo:
1) You do not configure the CUCM for media flow around, because you want the RTP traffic to terminate at the CUCM. You configure it on the mediation server because you do NOT want it to terminate on the pool server.

Do not use the a wildcard as the destination pattern (I honestly do not know what you are trying to configure...?

you need to understand the following:
The SIP configuration in CUCM is for SIP signalling. (IP address and Port of the mediation server) Then, the mediationserver will tell (negotiate with) the CUCM where to route the RTP traffic.

SIP is signalling, this is never in a flow around manner. RTP is set up between endpoints (CUCM and client) flowing around the mediation server.

KR,
Lasse
Edouard said…
I made a mistake I would like to wrote subnetmask.

Thank you for the explanation. The only thing I didn't know was that the SIP configuration in CUCM is ONLY for SIP signalling and not the RTP traffic.

Thank you Rundtomrundt
Anonymous said…
This is a really good post. Is there a way to make your screenshots clickable so that they can be enlarged? I am trying to set up the same solution but can't seem to quite make it work. I'm sure its something simple that I am overlooking.

thanks for posting such good work.
Hi Anonymous,

Glad you liked the post. Sorry for the missing "links". You are not the first one asking for this, so I have re-edited the post now. You should be able to click an image and see it in it's full size now.

Lasse
Jeff said…
Great Post!

I'm currently doing the same thing with CUCM 8.5(1). It works great except that every 6th or 7th call I'm getting a busy signal and the following error appears in my Lync Server:

SDP negotiation failed with the Gateway.

Gateway FQDN X.X.X.X , Reason GatewaySDP: Incompatible stream direction
Cause: The gateway is either not configured correctly, incompatible with Mediation Server, or not certified.
Resolution:
Check that the Mediation server and Gateway are configured correctly.

Is anyone else seeing this?
Anonymous said…
I got a issue on my system. I configured it the way you described here in a running CUCM System.
All is working fine. Calls from Lync Client to PSTN, PSTN to LYNC Client, LYNC Client to a Cisco internal IP Phone. But i can't call from a Cisco IP Phone to the LYNC Client.
I checked everything. I use only one route pattern pointed to the SIP Trunk. So calls from PSTN and from IP Phones flow the same way.
Has anyone ideas to troubleshoot? Is there a special thing i did not see?? How can i troubleshoot Lync?
many many thanks for your reply!!!
Hi Jeff,

Sorry to say, I have not seen the issue you're describing. Although, I am "only" using a 8.0 version of CUCM. I'll drop a post if I find anything.

Anonymous:
My guess is that you do not handle the digit manipulation correctly in CUCM before sending it out the trunk.
"In my world" The number should be fully globalized in CUCM. (Caller dials 3001 (internal calling) but you should send +4723233001 out the trunk).

I can highly reccomend installing the Reskit for Lync, and to use the snooper (logger) tool to trace the sip call on the Lync side of things.

You should also try the digit analysis tool in CUCM. Just to verify the call is going the right way, and is properly formatted. (Be aware there are a few service parameters you should have a closer look at).

Hope this helps :)
AA Mendoza said…
Hi, my name is Alex, this post looks pretty awesome, I just have a little question,

If a user have a cisco deskphone with ext 3001...
In Lync what extension do you give it?

So, I'm confused because my users don't wanna have two numbers-extension.
If they have the LYNC open wants ringing on both phones at the same time!

Thanks for the post
Hi Alejandro,

Have you read through the other posts I have on the subject? "Lync in coexistence with CUCM part 1-3"
They should help you on your question.

If you configure it right, It really doesn't matter which number you give the Lync client, as you will mask it on the way in/out. The user will only have to remember one number. (But it cannot be the exact same number)

Lasse
Anonymous said…
Hi, I followed the settings, but something doesn't work. when I dial from lync client the call doesn't connect. The trace on Lync server states: Received status code 504 for request sip:+431234567899@10.6.6.10:5070;user=phone;maddr=lync01.domain.local

why the request is sent to callmanager on port 5070? the pstn gateway port is specified as in screenshot (5066)
Anonymous said…
Hi,
ignore the previous post. It is some bug in Call Manager. If you create a new SIP Profile it doesn't work, but if you use or copy the default Non-Secure sip trunk profile - it works.

Thanks for the great post.
Ed said…
Thank you for the great write up.

I am trying to support a MS Lync 2010 pilot with CUCM 6.1.4.2190-3. Calls complete from Cisco to Lync but not Lync to Cisco.

Trace from Lync:

Trace-Correlation-Id: 3801282399
Instance-Id: 00000802
Direction: outgoing
Peer: 10.90.130.185:2108
Message-Type: response
Start-Line: SIP/2.0 404 Not Found
From: "tag=fd5d0f66e1;epid=87c4cecd30
To: ;tag=374a6b77f;epid=3AF1A13967
CSeq: 1 INVITE
Call-ID: 9deaba0bc1724d2891273927fb196192
Authentication-Info: TLS-DSK qop="auth", opaque="C9EAD53C", srand="29B9DA4A", snum="74", rspauth="38b8fb2a86e78ac14a59afc2218305a52871e6c7", targetname="mkealabvm66.alab2008.rockwell.com", realm="SIP Communications Service", version=4
Via: SIP/2.0/TLS 10.90.130.185:2108;ms-received-port=2108;ms-received-cid=5700
CONTENT-LENGTH: 0
P-ASSERTED-IDENTITY:
SERVER: RTCC/4.0.0.0 MediationServer
ms-diagnostics: 10404;source="mkealabvm68.alab2008";reason="Gateway responded with 404 Not Found (User Not Found)";component="MediationServer";SipResponseCode="404";SipResponseText="Not Found";sip-reason="Q.850;cause=1";GatewayFqdn="131.200.125.44"
ms-diagnostics-public: 10404;reason="Gateway responded with 404 Not Found (User Not Found)";component="MediationServer";SipResponseCode="404";SipResponseText="Not Found";sip-reason="Q.850;cause=1"
Reason: Q.850;cause=1
ms-trunking-peer: 131.200.125.44
ms-endpoint-location-data: NetworkScope;ms-media-location-type=intranet
Message-Body: –
$$end_record

Trace-Correlation-Id: 3801282399
Instance-Id: 00000802
Direction: incoming
Peer: mkealabvm68.alab2008:5070
Message-Type: response
Start-Line: SIP/2.0 404 Not Found
From: "alab2008>;tag=fd5d0f66e1;epid=87c4cecd30
To: ;tag=374a6b77f;epid=3AF1A13967
CSeq: 1 INVITE
Call-ID: 9deaba0bc1724d2891273927fb196192
VIA: SIP/2.0/TLS 10.80.178.209:55116;branch=z9hG4bK595C8DB4.6934605CA2A89590;branched=TRUE,SIP/2.0/TLS 10.90.130.185:2108;ms-received-port=2108;ms-received-cid=5700
CONTENT-LENGTH: 0
P-ASSERTED-IDENTITY:
SERVER: RTCC/4.0.0.0 MediationServer
ms-diagnostics: 10404;source="mkealabvm68.alab2008";reason="Gateway responded with 404 Not Found (User Not Found)";component="MediationServer";SipResponseCode="404";SipResponseText="Not Found";sip-reason="Q.850;cause=1";GatewayFqdn="10.90.80.10"
ms-diagnostics-public: 10404;reason="Gateway responded with 404 Not Found (User Not Found)";component="MediationServer";SipResponseCode="404";SipResponseText="Not Found";sip-reason="Q.850;cause=1"
Reason: Q.850;cause=1
ms-trunking-peer: 10.80.90.10 ms-endpoint-location-data: NetworkScope;ms-media-location-type=intranet
Message-Body: –
$$end_record

Any advice is appreciated.

Thank you.
This is a "user not found" message. To me it seems like the trunk is ok, but you might want to verify what the number looks like when it gets to the CUCM. And verify you translate it correct. I remember having issues with the "+" on incoming trunks on earlier versions of CUCM. You might want to use translation rules on the Lync trunk to manipulate the DID number to an exact match (Verify the trunk css, can see the partition where the DID resides).

Cheers!
Amir said…
We have a fully functional Lync system as well as a fully functional Cisco IP Phone system. These are all in production, and unfortunately, I don't have a lab to try this in. So, if I were to try this in production and followed all of your instructions carefully, what are the chances of bringing down the phone system? What are some of the things I should be aware of to prevent any production issues?
Hi Amir,

All you do when setting this up right, is enabling a signalling and calling path.

But, If you already have a enterprise voice enabled Lync, with it's own gateway/trunk to PSTN. You might want to be cautious when creating the routing in Lync/CUCM
Amir said…
HiRundtomrundt,

We have Lync and we have CUCM, but we don't have Lync enterprise voice setup yet, and that's the part i'm trying to setup now. So if I'm real careful, and follow instructions, chances of bringing down our existing phone system are not too high?
Yes,

Then you should be the clear.
Anonymous said…
Great post.

I have configured lync/ CUCM 7.1 SIP Trunk
and i can call from lync to an extension on CUCM however I am experiencing one-way voice. I can hear the the CUCM side from a lync client but i can't hear any audio in the lync to CUCM direction.

Any ideas/ pointers?

Many Thanks

Rich
Hi Rich,

One way voice can be many things. But generally I'd advice you to verify routing in both directions, and if any firewall port openings.

In my example I have configured media bypass, but you could try use the mediation server as a mediator and transcode resource. This way you have a one-to-one relationship in the audio setup.
Anonymous said…
I have configured lync/cucm8.5 SIP trunk as explained above. The destination phone rings, but it immediately hangs up with a 503 Service unavailable message in the event log. Any ideas what i may have missed?

Thanks,
M
Hi,

The error could be on both sides, but I would begin by going through the settings (Encryption not supported, Disable refersupport, enable/diable madia bypass based on your network)

Next, I would recommend you trace the call and analyze it in the Lync Snooper tool. Maybe start with the Mediation server log, then the client log (logging must be turned on for the client). Finally, RTMT tool from Cisco might shed some light over what's happening on the Cisco side.

Hope this helps :)
Anonymous said…
Hi,
I've integrated Lync and CUCM 8.0 using SIP trunk , and now I'm facing a problem with "Alerting Name" , when cisco phone call Lync , only Lync extension appears on cisco phone , how can I view both called name and number on cisco phone , I belive that cisco use RPID(Remote Party ID) for alerting name what does Lync use for this field ,for instance PAI (P Asserted ID) or anything else ??!

Thanks alot
Anonymous said…
Hi,
I've integrated Lync and CUCM 8.0 using SIP trunk , and now I'm facing a problem with "Alerting Name" , when cisco phone call Lync , only Lync extension appears on cisco phone , how can I view both called name and number on cisco phone , I belive that cisco use RPID(Remote Party ID) for alerting name what does Lync use for this field ,for instance PAI (P Asserted ID) or anything else ??!

Thanks alot
Anonymous said…
Hi,
I've integrated Lync and CUCM 8.0 using SIP trunk , and now I'm facing a problem with "Alerting Name" , when cisco phone call Lync , only Lync extension appears on cisco phone , how can I view both called name and number on cisco phone , I belive that cisco use RPID(Remote Party ID) for alerting name what does Lync use for this field ,for instance PAI (P Asserted ID) or anything else ??!

Thanks alot
Unknown said…
Hi All,

I have recently intergrated Lync with CUCM 9.1.I am facing the issue in called ID.When Lync client call to IP Phone its display "private number".But viceversa when IP phone call to Lync its showing the name and number.Please suggest.....Thanks Sachin
Unknown said…
Hi,
I have recently integrated Lync with CUCM 9.1.I am facing the issue in caller ID,when Lync client call to IP Phone its showing private number as display name.But when IP Phone call to Lync client it is showing the ASCII name and number.Please suggest.....
btakah said…
Just a note on the "Start-Line: SIP/2.0 404 Not Found" error.

I was getting this error too on the Lync side, and on CUCM side I was getting a "(1) Unallocated (unnasigned number)" Error, eventhough all routing was looking good.

Found out on the link bellow, that if you are using the PSTN gateway with a FQDN (my case), then you need to add it on the CUCM Enterprise Parameter "Cluster Fully Qualified Domain Name", otherwise CUCM won't accept the call.

Regards and thanks for the post.

Reference for the problem above:
https://supportforums.cisco.com/thread/2179773