When a
call is initiated between two endpoints it is important to have information of
calling and called party IP address both for signaling and media, codec they
are going to use and several other important information. In a SIP based call (call where SIP protocol is used) we use
SDP to advertise media information like transport
address, transport protocol, codec, ports and other session description information. SDP works at application layer. SDP is defined in RFC 2327, 4566 (newer). Normally we see SDP in Invite, 200 OK
or ACK depending on the call type which we will discuss soon.
SDP protocol is
divided into three parts:
Session Description-
Indicates Session Details
Time Description-
Advertises Timing Details
Media Description-
Advertises detail about media
Below is the
syntax of the three:
Session
Description:
v = (protocol
version)
o =
(owner/creator and session identifier)
s = (session
name)
i =* (session
information)
u =* (URI of
description)
e =* (email
address)
p =* (phone
number)
c =* (connection
information - not required if included in all media)
b =* (bandwidth
information)
z =* (time zone
adjustments)
k =* (encryption
key)
a =* (zero or
more session attribute lines)
Time Description:
t =* (session
active time)
r =* (zero or
more repeat times)
Media
Description:
m =* (media names
and transport address)
i =* (media
title/information field)
c =* (connection
information - not required if included at session)
b =* (bandwidth
information lines)
k =* (encryption
key)
a =* (media
attribute lines)
Here is a sample
SDP from a call:
v = 0 ---------> SDP version (current version is 0)
o = jammy 2890844526 2890842807 IN IP4
126.16.16.4 -----> contains
information about originator.
"o" =
<username><session-id><version><network-type><address-type>
s = SDP Virtual Lab-----> name of the session
i = A Seminar on the session description
protocol ---->Human
Readable description of session
u = http://www.ciscovoicevirtuallab.blogspot.com
/Santosh Agrawal
----->Specifies a URI for more info of session
e =
jammy@ciscovoicevirtuallab.blogspot.com (Santosh Agrawal) -----> email of the host of the
session
c = IN IP4 10.10.0.1/127 -----> Contains info about the media
connection, IP is of host who is sending media.
t = 287335269 287346324 -----> start and stop time of session
m = audio 49170 RTP/AVP 0 8 18 -----> media type - audio, port 49170
on which this party will receive audio, protocol is RTP, media format means
codec
a=rtpmap: 0 PCMU/8000/1 -----> In the above m line 0 stands
for G711 u law codec sampled at the rate of 8000 samples per second.
a=rtpmap: 8 PCMA/8000/1 ----->in above m line 8 stands for G711 a law codec
sampled at the rate of 8000 samples per second.
a=rtpmap: 18 G729/8000/1 -----> in above m line 0 stands for G729 codec sampled
at the rate of 8000 samples per second.
m = video 51372 RTP/AVP 31 -------> its same as above but media
type is video and codecs would be different.
For
more details on SDP, you can refer RFC 4566 https://tools.ietf.org/html/rfc4566
PS: If you like this post please like my Facebook
page Cisco Voice Virtual
Lab which will help
you to know about my next post on Facebook.
A good explanantion of SDP !!
ReplyDeleteI pay a visit each day some web pages and blogs to read articles, except this webpage gives quality based articles.
ReplyDelete