Lync Protocols

SIP (Session Initiation Protocol) is the backbone of all Lync Platforms, Lync was built on the use of SIP, SIP was also extended to accommodates the additional functionalities provided by Lync.

In this article I will be talking about some Lync Protocols, explain the anatomy of the protocol , how to read it and understand it, and how you can use

This knowledge in troubleshooting scenarios.

SDP Anatomy

SDP (Session Description Protocol), as you can see from the name, it’s used to describe the session.

Consider it as a negotiation protocol, it’s used so that each endpoint in the session can tell each other what methods they can talk (media codecs), the IP and ports and authentication

SDP schema:

v= version

o= originator / creator of the session

s= session name

c= connection information

t= time

a= media attribute lines

m= media description

Version

it provide the version of the SDP protocol used for now it should always show 0.

E.g.

v=0

Originator

This field provide the GUID of the creator of the session and its value usually look like (consist of 5 parts)

o= LoginID  SessionID  SessionVersion  Network type/address type  OriginatorIP

o= lyncdude 29336 0 IN IP4 192.168.1.10

Login ID [lyncdude] = the username or sometime the device type like “phone”.

Session ID [29336] = this is used for the purpose of VOIP, should be the UDP/TCP that the originator expect to receive RTP

Session Version [0] = usually get a value of the creating function in this case 0 is for voice

Network Type / address type [IN IP4] = IN for “internet” and IP4 is for “IPv4”

Originator IP [192.168.1.10] =  the IP address of the creator of the session.

Session Name

This provide the name of the session in a textual form, two thing to know here

  1. There must be ONLY one name per session
  2. This field CANNOT be empty.

E.g.

s= session

Connection Information

This field shows the network type and the IP address type that the other end should contact.

E.g.

c= IN IP4 192.168.1.10

You will notice is a part of the O= line

Timing

This field shows the start and the stop time of the session, one session might have multiple t= lines. Each line will specifies an additional

Period of time for which the session will be active.

Media attributes

This line extend the capability of the SDP, and you can think of it as the what media codec can the creator understand.

So usually it look something like this:

a=rtpmap:9 G722/8000

a=rtpmap:112 G7221/16000

Its listing the each different media codec and the rate used.

Here is a table with some of the available media codecs and relevant rates (RTP A/V profile):

Codec name Rate (Hz) PT
PCMU 8.000 0
GSM 8.000 3
G723 8.000 4
DVI4 8.000 5
DVI4 16.000 6
LPC 8.000 7
PCMA 8.000 8
G722 8.000 9
L16 44.100 10
L16 44,100 11
QCELP 8.000 12
CN 8.000 13
MPA 90.000 14
G728 8.000 15
DVI4 11.025 16
DVI4 22.050 17
G729 8.000 18
G726-16 8.000 DYN
G726-24 8.000 DYN
G726-32 8.000 DYN
G726-40 8.000 DYN
G729D 8.000 DYN
G729E 8.000 DYN
GSM-EFR 8.000 DYN
H263 90.000 DYN

Also this line is used for exchange of the ICE candidate information.

Media Description

This line shows the order in which the media codec should be negotiated.

E.g.

m=audio 4680 RTP/AVP 114 9 112  111 0

Previous line explaining that the media type is “audio”  using the port “4680” and codec “RTAudio” and the available rates are 114, 9, 112,…etc.

Example

SDP for IM session

So this is a screen shot of my environment when starting an IM session

SDP_IM

SDP for Audio Session

This is a screen shot from my environment for an audio session you can see it listing all available media attributes

SDP_audio

so if you can read those last two screen shots and understand half of them, you are on the correct way.

Lync Behind the Scene – Part 2