In the previous blog post, we walked through the features of Skype for Business and Teams co-existence and also covered how to configure interoperability between these two popular communications platforms. In this blog post, we take a close peek under the hood of what goes on when a user on Teams makes a video call to Skype for Business user homed on-premise. Using the Skype for Business server debugging tools, we capture the SIP messages to get a more in-depth technical understanding of video interoperability between the Teams cloud and an on-premise Skype for Business Server

Just to recap, our test environment here involves two users who are both enabled for Skype for Business as well as Teams. The first user Jack Reacher jack.reacher@ucprimer.com is homed on an on-premise Skype for Business FE pool prefers to use Skype for Business for audio/video calls while the other user Helen Rodin hrodin@ucprimer.com prefer to use Teams instead for all calls. Recall that in our last blog post, we configure the global Teams interop policy to use Skype for Business as the default client for audio/video calls while allowing users to override this policy by configuring their preferences in the Teams client. The global Teams interop policy is thus configured as shown in the diagram below:

With this policy, there is nothing that Jack needs to do as the default behaviour will be for all incoming audio/video calls to be land on his Skype for Business client. So when Helen, a Teams user initiates a call to Jack from her Teams client, Jack's Skype for Business client will ring and allow him to answer the call, thereby establishing an audio/video session between a Teams client and a Skype for Business client as shown in the diagrams below:

To capture the SIP details of this call, we use the CLS logging tool in one of the Skype for Business FE servers and set the logging scenario to AlwaysOn as shown below:

Once the call has been established between Jack and Helen, we retrieve the logs and use the Snooper tool to look at the SIP messages and we can find some interesting aspects of video interoperability between Skype for Business and Teams. First, lets take a look at the SIP INVITE message that is coming into Skype for Business client from the Teams client:

First thing that we can notice is that the INVITE appears to come from a regular SIP user:

Start-Line: INVITE sip:jack.reacher@ucprimer.com:5061;maddr=lyncfe1.ucprimer.local SIP/2.0From: "Helen Rodin"<sip:helen.rodin@ucprimer.com>;epid=00411A4CB4;tag=2d58dc6337However, we know that Teams is not a SIP client, but it appears as a SIP client when calling Skype for Business. Next, we look at the contact header:Contact: <sip:sip2.lgw.skype.com:50105;ms-fe=c-lgw-asse-02.lgw.skype.com;transport=Tls;ms-opaque=e63097266c25ebd8>;isGateway;text;audio;video;image;application

The contact header tells us that there is a Skype-Teams gateway involved and the SIP address of the gateway for subsequent communications is sip2.lgw.skype.com on port 50105 and we can see the 'isGateway' flag is present. Next, we look at the Via fields:

The Via fields shows us the path of taken by the messages since every proxy in the request path adds to top of the “Via” the address and port on which it received the message, than forwards it onwards. The first two Via IP addresses are of the on-premise FE Pool and the Edge Server. The third and sixth Via IP address 52.113.3.15 (Singapore) and 13.100.14.203 (USA) are from the Microsoft cloud and are likely to be addresses of the gateways handling call interop between Skype and Teams. Let's take a closer look at the SIP message:

o=- 0 0 IN IP4 104.44.201.170The origin IP appears to belong to Skype.com domain located in the US.

a=x-mediabw:main-video send=12000;recv=12000This indicates the max bandwidth allowable for video is 12000kbps or 12Mbps, which is more than enough for high definition video up to 1080p30

a=candidate:4 1 UDP 184547839 104.44.201.170 3480 typ relay raddr 27.104.8.102 rport 50008 MTURNID 2486776825723936754a=candidate:4 2 UDP 184547326 104.44.201.170 3480 typ relay raddr 27.104.8.102 rport 50009 MTURNID 14569895359562254455Details of the ICE candidates will not be covered here since they are well covered in many articles. This is a good Ignite session to understand more details regarding how ICE works in Teams: https://www.youtube.com/watch?v=aD5mUg2ZzLQ

Lets scroll further down the SIP message:

m=video 3480 RTP/SAVP 122 107 99 123This indicates the video codecs that are supported in order of preference - 122 is the Microsoft implementation of SVC known as X-H264UC while 107 is industry standard H.264 protocol. These are the only 2 video codecs supported by Teams at this time.

After the necessary ICE checks and codec negotiations are complete, we can see the 200 OK SIP message as shown:

Finally, to end the session we hang up the call from the Skype for Business client which results in a SIP BYE message from the gateway sip2.lgw.skype.com:

In conclusion, we can see that audio/video interoperability between Skype for Business and Teams involves a gateway which is not surprising given that Teams is not a SIP client but a http client that uses REST for signalling. However, the audio and video codecs are pretty much standard ones being used by Skype for Business as well as other industry standard audio/video endpoints, namely G.722 and H.264. This adoption of industry standard codecs by Teams will play a key factor in interoperability solutions that will be coming in the near future and we will cover these in future blog posts.