Quick Glance @ SDP

SDP is intended to be used for describing multimedia sessions for the purposes of session announcement, session invitation, and other forms of multimedia session initiation.

http://www.ietf.org/rfc/rfc2327.txt

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)
One or more time descriptions (see below)
z=* (time zone adjustments)
k=* (encryption key)
a=* (zero or more session attribute lines)
Zero or more media descriptions (see below)

Time description
t=  (time the session is active)
r=* (zero or more repeat times)

Media description
m=  (media name and transport address)
i=* (media title)
c=* (connection information – optional if included at session-level)
b=* (bandwidth information)
k=* (encryption key)
a=* (zero or more media attribute lines)

SAMPLE :

Sent:
INVITE sip:2911111@208.0.0.5:5060 SIP/2.0
Via: SIP/2.0/UDP 65.0.0.57:5060;branch=z9hG4bKB287C
Remote-Party-ID: "NWN" ;party=calling;screen=no;privacy=off
From: "NWN" ;tag=27EFF0FC-2073
To:
Date: Wed, 03 Feb 2010 16:46:25 GMT
Call-ID: 8088F61B-101A11DF-8C6ACB9F-36887B6A@65.0.0.57
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE:  1800
Cisco-Guid: 2044219673-270143967-2355415967-914914154
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, REGISTER
CSeq: 101 INVITE
Max-Forwards: 70in
Timestamp: 1265215585
Contact:
Expires: 180
Allow-Events: telephone-event
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 240

!SDP HEADER HERE

v=0
o=CiscoSystemsSIP-GW-UserAgent 6135 7812 IN IP4 65.0.0.57
s=SIP Call
c=IN IP4 65.0.0.57
t=0 0
m=audio 19344 RTP/AVP 0 100
c=IN IP4 65.0.0.57
a=rtpmap:0 PCMU/8000
a=rtpmap:100 X-NSE/8000
a=fmtp:100 192-194
a=ptime:20

*Feb  3 16:46:25.661: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 65.0.0.57:5060;branch=z9hG4bKB287C;received=65.0.0.57
From: "NWN" ;tag=27EFF0FC-2073
To:
Call-ID: 8088F61B-101A11DF-8C6ACB9F-36887B6A@65.0.0.57
CSeq: 101 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact:
Content-Length: 0

*Feb  3 16:46:26.693: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 65.0.0.57:5060;branch=z9hG4bKB287C;received=65.0.0.57
From: "NWN" ;tag=27EFF0FC-2073
To: ;tag=as76f79303
Call-ID: 8088F61B-101A11DF-8C6ACB9F-36887B6A@65.0.0.57
CSeq: 101 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact:
Content-Type: application/sdp
Content-Length: 180

v=0
o=root 24622 24622 IN IP4 208.0.0.5
s=session
c=IN IP4 208.0.0.5
t=0 0
m=audio 12778 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

Now based on http://www.ietf.org/rfc/rfc3551.txt  & http://www.ietf.org/rfc/rfc4317.txt we can conclude, that audio is going to be encoded in PCMU as negotiated

As a side note, the UAS is not negotiating fmtp:100 192-194,

a=fmtp:<format> <format specific parameters>
This attribute allows parameters that are specific to a
particular format to be conveyed in a way that SDP doesn’t have
to understand them. The format must be one of the formats
specified for the media. Format-specific parameters may be any
set of parameters required to be conveyed by SDP and given
unchanged to the media tool that will use this format.

bringing possible issues with DTMF Tones (in-band or out-band) – Where  In-band relates to the RTP media stream, while out-of-band relates to the signaling path.

o=<username> <session id> <version> <network type> <address type>
<address>

=============================================================
o=CiscoSystemsSIP-GW-UserAgent 6135 7812 IN IP4 65.0.0.57
=============================================================

<network type> is a text string giving the type of network.
Initially “IN” is defined to have the meaning “Internet”.  <address
type> is a text string giving the type of the address that follows.
Initially “IP4” and “IP6” are defined.  <address> is the globally
unique address of the machine from which the session was created.
For an address type of IP4, this is either the fully-qualified domain
name of the machine, or the dotted-decimal representation of the IP
version 4 address of the machine.  For an address type of IP6, this
is either the fully-qualified domain name of the machine, or the
compressed textual representation of the IP version 6 address of the
machine.  For both IP4 and IP6, the fully-qualified domain name is
the form that SHOULD be given unless this is unavailable, in which
case the globally unique address may be substituted.  A local IP
address MUST NOT be used in any context where the SDP description
might leave the scope in which the address is meaningful.

In general, the “o=” field serves as a globally unique identifier for
this version of this session description, and the subfields excepting
the version taken together identify the session irrespective of any
modifications.

=========================
m=<media> <port> <transport> <fmt list>

=========================
m=audio 12778 RTP/AVP 0
=========================

m=video 49170/2 RTP/AVP 31

would specify that ports 49170 and 49171 form one RTP/RTCP pair and
49172 and 49173 form the second RTP/RTCP pair.  RTP/AVP is the
transport protocol and 31 is the format

31        H261            V                  90000                              [RFC4587]

session description may contain a number of media descriptions.
Each media description starts with an “m=” field, and is terminated
by either the next “m=” field or by the end of the session
description.

An example of a static payload type is u-law PCM coded single
channel audio sampled at 8KHz.  This is completely defined in the
RTP Audio/Video profile as payload type 0, so the media field for
such a stream sent to UDP port 49232 is:

m=video 49232 RTP/AVP 0

An example of a dynamic payload type is 16 bit linear encoded
stereo audio sampled at 16KHz.  If we wish to use dynamic RTP/AVP
payload type 98 for such a stream, additional information is
required to decode it:

m=video 49232 RTP/AVP 98

http://www.iana.org/assignments/rtp-parameters

=========================
m=audio 12778 RTP/AVP 0
=========================

Registry:
PT        encoding name   audio/video (A/V)  clock rate (Hz)  channels (audio)  Reference
——–  ————–  —————–  —————  —————-  ———
0         PCMU            A                  8000             1                 [RFC3551]

=========================
a=rtpmap:0 PCMU/8000
=========================

a=<attribute>
a=<attribute>:<value>

A media description may have any number of attributes (“a=” fields)
which are media specific.  These are referred to as “media-level”
attributes and add information about the media stream.

Attribute fields can also be added before the first media field; these
“session-level” attributes convey additional information that applies
to the conference as a whole rather than to individual media; an
example might be the conference’s floor control policy.

Attribute fields may be of two forms:

o property attributes.  A property attribute is simply of the form
“a=<flag>”.  These are binary attributes, and the presence of the
attribute conveys that the attribute is a property of the session.
An example might be “a=recvonly”.

o value attributes.  A value attribute is of the form
“a=<attribute>:<value>”.  An example might be that a whiteboard
could have the value attribute “a=orient:landscape”

A Networker Blog

Advertisements

2 thoughts on “Quick Glance @ SDP

  1. Hi vcappucio, this is a great analysis. It helped me to understand a couple of things more.

    Keep up the good work man!

    -Ad

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s