IMS/SIP - SDP                                   Home : www.sharetechnote.com

 

 

 

SDP stands for Session Description Protocol and it is used to multimedia session so that each communication party understand each other in terms of the various multimedia capability. Formal specification for SDP is RFC 4566 and 3GPP 24.229. Regarding Offset/Aswer model of SDP, refer to RFC 3264.

 

SDP is usually carried by a SIP message (e.g, in the body of SIP : INVTE message as shown in this example).

 

If you are more familiar with Radio Access protocol and beginner at IMS/SIP, you may think SDP as a description for Bearer Setup in Radio Access Protocol (This analogy may be a little misleading, but it helps me at least)

 

 

 

SDP Usage in Typical Context

 

SDP is usually exchanged between both communicating parties being embedded in various SIP messages. One of the common examples are show below (detailed description for this procedure is described in Precondition page)

 

 

 

 

SDP Offer / Answer Model

 

SDP is performed in two way negotiation called Offer / Answer model. A typical Offer / Ansewr operation in SIP Audio / Video can be summarized as below (based on ETSI TR 183.046 V2.0.0(2008-01)).

 

Offer in

Answer in

Comments

INVITE 180/183 and OK the ANSWER is repeated in the 200 OK if 100 rel not being used
INVITE 200 OK Late terminating SDP
180/183 PRACK Late Originating SDP. RFC3262 mandates that the Answer to a 18X OFFER must be included in the PRACK
200 OK ACK Late SDP at both originating and terminating ends
UPDATE 200 OK  
re-INVITE 200 OK  

 

 

Example 01 > VoLTE(Voice Call) with Precondition OFF

 

SDP Offer

SDP Answer

 

(6) 200 OK / SDP

v=0

o=TEST-IMS-UE 1513311076564347 0 IN IP6 2001:0:0:1::11

s=SS VOIP

c=IN IP6 2001:0:0:1::11

t=0 0

m=audio 1268 RTP/AVP 127 114 113 102 115 105 101

b=AS:38

b=RS:0

b=RR:0

a=rtpmap:127 EVS/16000

a=fmtp:127 br=5.9-13.2;bw=nb-wb;ch-aw-recv=2

a=rtpmap:114 AMR-WB/16000/1

a=fmtp:114 mode-change-capability=2;max-red=220

a=rtpmap:113 AMR-WB/16000/1

a=fmtp:113 octet-align=1;mode-change-capability=2;max-red=220

a=rtpmap:102 AMR/8000/1

a=fmtp:102 mode-change-capability=2;max-red=220

a=rtpmap:115 AMR/8000/1

a=fmtp:115 octet-align=1;mode-change-capability=2;max-red=220

a=rtpmap:105 telephone-event/16000

a=fmtp:105 0-15

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-15

a=curr:qos local none

a=curr:qos remote none

a=des:qos mandatory local sendrecv

a=des:qos optional remote sendrecv

a=sendrecv

a=ptime:20

a=maxptime:240

v=0

o=sharetechnote 662 837663 IN IP6 2001:0:0:1::2

s=-

i=A VOIP Session

c=IN IP6 2001:0:0:1::2

t=0 0

m=audio 60000 RTP/AVP 127 105

b=AS:38

b=RS:0

b=RR:0

a=rtpmap:127 EVS/16000

a=fmtp:127 br=5.9-13.2;bw=nb-wb;ch-aw-recv=2

 

 

 

 

 

 

 

 

a=rtpmap:105 telephone-event/16000

a=fmtp:105 0-15

 

 

 

a=curr:qos local none

a=curr:qos remote none

a=des:qos mandatory local sendrecv

a=des:qos optional remote sendrecv

a=ptime:20

a=maxptime:240

a=sendrecv

a=rtcp:60001

 

 

 

Example 02 > ViLTE(Video Call) with Precondition OFF

 

SDP Offer

SDP Answer

INVITE / SDP

200 OK / SDP (to INVITE)

v=0

o=TEST-IMS-UE 1512509116584328 0 IN IP6 2001:0:0:1::11

s=SS VOIP

c=IN IP6 2001:0:0:1::11

t=0 0

m=audio 1234 RTP/AVP 127 114 113 102 115 105 101

b=AS:38

b=RS:0

b=RR:2500

a=rtpmap:127 EVS/16000

a=fmtp:127 br=5.9-13.2;bw=nb-wb;ch-aw-recv=2

a=rtpmap:114 AMR-WB/16000/1

a=fmtp:114 mode-change-capability=2;max-red=220

a=rtpmap:113 AMR-WB/16000/1

a=fmtp:113 octet-align=1;mode-change-capability=2;max-red=220

a=rtpmap:102 AMR/8000/1

a=fmtp:102 mode-change-capability=2;max-red=220

a=rtpmap:115 AMR/8000/1

a=fmtp:115 octet-align=1;mode-change-capability=2;max-red=220

a=rtpmap:105 telephone-event/16000

a=fmtp:105 0-15

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-15

a=curr:qos local none

a=curr:qos remote none

a=des:qos mandatory local sendrecv

a=des:qos optional remote sendrecv

a=sendrecv

a=ptime:20

a=maxptime:240

 

m=video 49152 RTP/AVP 118 34

b=AS:416

b=RS:4000

b=RR:12000

a=rtpmap:118 H264/90000

a=fmtp:118 profile-level-id=42800C;packetization-mode=1;sprop-parameter-sets=Z0KADNoPCmQ=,aM4G4g==

a=rtpmap:34 H263/90000

a=fmtp:34 profile=0;level=10

a=framerate:15

a=extmap:7 urn:3gpp:video-orientation

a=tcap:1 RTP/AVPF

a=rtcp-fb:* trr-int 2000

a=rtcp-fb:* nack

a=rtcp-fb:* nack pli

a=rtcp-fb:* ccm fir

a=rtcp-fb:* ccm tmmbr

a=pcfg:1 t=1

a=curr:qos local none

a=curr:qos remote none

a=des:qos mandatory local sendrecv

a=des:qos optional remote sendrecv

a=sendrecv

v=0

o=sharetechnote 289 57312 IN IP6 2001:0:0:1::2

s=-

i=A VOIP Session

c=IN IP6 2001:0:0:1::2

t=0 0

m=audio 60000 RTP/AVP 127 105

b=AS:38

b=RS:0

b=RR:2500

a=rtpmap:127 EVS/16000

a=fmtp:127 br=5.9-13.2;bw=nb-wb;ch-aw-recv=2

 

 

 

 

 

 

 

 

a=rtpmap:105 telephone-event/16000

a=fmtp:105 0-15

 

 

a=curr:qos local none

a=curr:qos remote none

a=des:qos mandatory local sendrecv

a=des:qos optional remote sendrecv

a=ptime:20

a=maxptime:240

a=sendrecv

a=rtcp:60001

 

m=video 60002 RTP/AVP 118

b=AS:416

b=RS:4000

b=RR:12000

a=rtpmap:118 H264/90000

a=fmtp:118 profile-level-id=42800C;packetization-mode=1;sprop-parameter-sets=Z0KADNoPCmQ=,aM4G4g==

 

 

a=framerate:15

a=extmap:7 urn:3gpp:video-orientation

a=tcap:1 RTP/AVPF

a=rtcp-fb:* trr-int 2000

a=rtcp-fb:* nack

a=rtcp-fb:* nack pli

a=rtcp-fb:* ccm fir

a=rtcp-fb:* ccm tmmbr

a=pcfg:1 t=1

a=curr:qos local none

a=curr:qos remote none

a=des:qos mandatory local sendrecv

a=des:qos optional remote sendrecv

a=sendrecv

a=rtcp:60003

 

 

Example 03 > VoLTE with Precondition ON

 

SDP Offer

SDP Answer

INVITE / SDP

183 Session Progress / SDP

v=0

o=TEST-IMS-UE 1513308379930499 0 IN IP6 2001:0:0:1::11

s=SS VOIP

c=IN IP6 2001:0:0:1::11

t=0 0

m=audio 1268 RTP/AVP 127 114 113 102 115 105 101

b=AS:38

b=RS:0

b=RR:0

a=rtpmap:127 EVS/16000

a=fmtp:127 br=5.9-13.2;bw=nb-wb;ch-aw-recv=2

a=rtpmap:114 AMR-WB/16000/1

a=fmtp:114 mode-change-capability=2;max-red=220

a=rtpmap:113 AMR-WB/16000/1

a=fmtp:113 octet-align=1;mode-change-capability=2;max-red=220

a=rtpmap:102 AMR/8000/1

a=fmtp:102 mode-change-capability=2;max-red=220

a=rtpmap:115 AMR/8000/1

a=fmtp:115 octet-align=1;mode-change-capability=2;max-red=220

a=rtpmap:105 telephone-event/16000

a=fmtp:105 0-15

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-15

a=curr:qos local none

a=curr:qos remote none

a=des:qos mandatory local sendrecv

a=des:qos optional remote sendrecv

a=sendrecv

a=ptime:20

a=maxptime:240

v=0

o=sharetechnote 133 815180 IN IP6 2001:0:0:1::2

s=-

i=A VOIP Session

c=IN IP6 2001:0:0:1::2

t=0 0

m=audio 60000 RTP/AVP 127 105

b=AS:38

b=RS:0

b=RR:0

a=rtpmap:127 EVS/16000

a=fmtp:127 br=5.9-13.2;bw=nb-wb;ch-aw-recv=2

 

 

 

 

 

 

 

 

 

a=rtpmap:105 telephone-event/16000

a=fmtp:105 0-15

 

 

a=curr:qos local none

a=curr:qos remote none

a=des:qos optional local sendrecv

a=des:qos mandatory remote sendrecv

a=ptime:20

a=maxptime:240

a=conf:qos remote sendrecv

a=sendrecv

a=rtcp:60001

 

 

 

SDP Offer

SDP Answer

UPDATE / SDP

200 OK/ SDP (to UPDATE)

v=0

o=TEST-IMS-UE 1513308379930499 1 IN IP6 2001:0:0:1::11

s=SS VOIP

c=IN IP6 2001:0:0:1::11

t=0 0

 

m=audio 1268 RTP/AVP 127 105

b=AS:38

b=RS:0

b=RR:0

a=rtpmap:127 EVS/16000

a=fmtp:127 br=5.9-13.2;bw=nb-wb;ch-aw-recv=2

a=rtpmap:105 telephone-event/16000

a=fmtp:105 0-15

a=ptime:20

a=maxptime:240

a=curr:qos local sendrecv

a=curr:qos remote none

a=des:qos mandatory local sendrecv

a=des:qos optional remote sendrecv

a=sendrecv

v=0

o=sharetechnote 133 815181 IN IP6 2001:0:0:1::2

 

s=-

i=A VOIP Session

c=IN IP6 2001:0:0:1::2

t=0 0

m=audio 60000 RTP/AVP 127 105

b=AS:38

b=RS:0

b=RR:0

a=rtpmap:127 EVS/16000

a=fmtp:127 br=5.9-13.2;bw=nb-wb;ch-aw-recv=2

a=rtpmap:105 telephone-event/16000

a=fmtp:105 0-15

a=ptime:20

a=maxptime:240

a=curr:qos local sendrecv

a=curr:qos remote sendrecv

a=des:qos optional local sendrecv

a=des:qos mandatory remote sendrecv

a=conf:qos remote sendrecv

a=sendrecv

a=rtcp:60001

 

 

 

 

Data Structure of SDP message

 

Overall structure of SDP message is as shown below and the parameters and their meaning is described in this section.

 

 

 

Session description

    v= (protocol version)

    o= (owner/creator and session identifier)

    s= (session name)

    i= Optional (session information)

    u= Optional (URI of description)

    e= Optional (email address)

    p= Optional (phone number)

    c= Optional (connection information -not required if included in all media)

    b= Optional (bandwidth information)

 

 

One or more time descriptions

    z= Optional (time zone adjustments)

    k= Optional (encryption key)

    a= Optional (zero or more session attribute lines)

 

 

Time description

    t= (time the session is active)

      Syntax : t=<start-time> <stop-time>

      Unit : Network Time Protocol (NTP) time values in seconds since 1900

      Ex1 : t = x 0 --> start at time x, no end tme(not bounded)

      Ex2 : t = 0 0 --> the session is permanent

    r= Optional (zero or more repeat times)

 

 

Media description

 

    m= (media name and transport address)

      Syntax : m=<media> <port>/<number of ports> <proto> <fmt>

      Ex1 : m=video 49170/2 RTP/AVP 31

    i= Optional (media title)

    c= Optional (connection information -optional if included at session-level)

    b= Optional (bandwidth information)

      Syntax : b=<bwtype>:<bandwidth>

           bwtype : CT (Conference Total), AS(Application Specific)

    k= Optional (encryption key)

    a= Optional (zero or more media attribute lines)

      Refer to SDP Attribute (Details are in RFC 4566 6.SDP Attributes)

      a=cat:<category>

      a=keywds:<keywords>

      a=tool:<name and version of tool>

      a=ptime:<packet time>

      a=maxptime:<maximum packet time>

      a=rtpmap:<payload type> <encoding name>/<clock rate> [/<encoding parameters>]

        Ex1 : m=audio 49230 RTP/AVP 96 97 98

                a=rtpmap:96 L8/8000

                a=rtpmap:97 L16/8000

                a=rtpmap:98 L16/11025/2

      a=recvonly

      a=sendrecv

      a=sendonly

      a=inactive

      a=orient:<orientation>

      a=type:<conference type>

      a=charset:<character set>

      a=sdplang:<language tag>

      a=lang:<language tag>

      a=framerate:<frame rate>

      a=quality:<quality>

      a=fmtp:<format> <format specific parameters>

 

 

RTP/AVP  (RTP Audio Video Playformat)

 

The number following AVP is the number defines specific play format. If the number is up to 96, it means it is the codec perdefined the specification. If it is greater than 97, it means dynamic codec which is supposed to be described in the attribute as shown in the following example.

 

    m=audio 53746 RTP/AVP 107 97 110  // This mean, this media is configured for three different format

                                                       // numbered as 107, 97, 110. The detailed configuration for each format

                                                       // number is defined as follows.

     

    a=rtpmap:107 AMR-WB/16000

    a=fmtp:107 octet-align=1; mode-set=2

    a=rtpmap:97 AMR/8000

    a=fmtp:97 octet-align=1; mode-set=7

    a=rtpmap:110 telephone-event/8000

    a=fmtp:110 0-15

 

For the predefined AVP and other play format, refer to Wikipedia : RTP audio video profile

 

 

RTP/RTCP Bandwidth

 

RTP/RTCP Bandwidth is specified as shown in the following example. AS (Application Specific) indicate the bandwith for RTP and RS/RR configures frequency for RTCP send and RTCP report.

    m=audio 53746 RTP/AVP 107 97 110

    b=AS:49

    b=RS:800

    b=RR:2400

 

 

AMR

 

AMR is specified in rfc4867. One example is as shown below.

    a=rtpmap:102 AMR/8000

    a=fmtp:102 mode-set=0,1,2,3,4,5,6,7;mode-change-capability=2;max-red=0

The meaning of the detailed parameter is described in 8.1. AMR Media Type Registration of RFC4867. However, the meaning of each number for the mode-set is defined in other specification (TS 26.101) as follows.

 

 

Here goes some more example of AMR/AMR-WB examples you may often see in the VoLTE log.

    a=rtpmap:104 AMR-WB/16000

    a=fmtp:104 mode-set=0,1,2,3,4,5,6,7;mode-change-capability=2;max-red=0

     

    a=rtpmap:107 AMR-WB/16000

    a=fmtp:107 octet-align=1; mode-set=2

     

    a=rtpmap:97 AMR/8000

    a=fmtp:97 octet-align=1; mode-set=7

 

 

Wideband AMR / AMR Wideband

 

AMR is specified in rfc4867. One example is as shown below.

    a=rtpmap:97 AMR-WB/16000

    a=fmtp:97 mode-set=7

 

The meaning of each number for the mode-set is defined in other specification (TS 26.201) as follows.

 

 

 

Example 1 :  Voice Over LTE

 

    v=0

    o=MYIMS 1 1 IN IP4 192.168.1.2

    s=-

    i=A VOIP Session

    c=IN IP4 192.168.1.2

    t=0 0

    m=audio 53746 RTP/AVP 107 97 110

          --> This is media definition of the session. Format 107, 87, 110 is defined as below.

          ---> 53746 refers to the port number for RTP/AVP session

    b=AS:49

    b=RS:800

    b=RR:2400

    a=ptime:20

    a=maxptime:20

    a=rtpmap:107 AMR-WB/16000

    a=fmtp:107 octet-align=1; mode-set=2

    a=rtpmap:97 AMR/8000

    a=fmtp:97 octet-align=1; mode-set=7

    a=rtpmap:110 telephone-event/8000

    a=fmtp:110 0-15

    a=mid:0

    a=sendrecv

     

     

Example 2 :  Voice Over LTE

 

    v=0

    o=sip:001010123456789@ims.mnc01.mcc001.3gppnetwork.org 3670975461 3670975461 IN IP6 2001:0:0:1::11

    s=-

    c=IN IP6 2001:0:0:1::11

    t=0 0

    m=audio 50010 RTP/AVP 97 98 99 100 101 102

    b=AS:49

    b=RS:0

    b=RR:1200

    a=rtpmap:97 AMR-WB/16000/1

    a=fmtp:97 mode-change-capability=2

    a=rtpmap:98 AMR-WB/16000/1

    a=fmtp:98 octet-align=1; mode-change-capability=2

    a=rtpmap:99 telephone-event/16000

    a=fmtp:99 0-15

    a=rtpmap:100 AMR/8000/1

    a=fmtp:100 mode-change-capability=2

    a=rtpmap:101 AMR/8000/1

    a=fmtp:101 octet-align=1; mode-change-capability=2

    a=rtpmap:102 telephone-event/8000

    a=fmtp:102 0-15

    a=curr:qos local none

    a=curr:qos remote none

    a=des:qos mandatory local sendrecv

    a=des:qos optional remote sendrecv

    a=sendrecv

    a=ptime:20

    a=maxptime:240

 

 

Example 3 : Video over IP

     

    v=0

    o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4

    s=SDP Seminar

    i=A Seminar on the session description protocol

    u=http://www.sharetechnote.com/jk/sdp.03.ps

    e=jk@sharetechnote.com

    c=IN IP4 224.2.17.12/127

    t=2873397496 2873404696

    a=recvonly

    m=audio 49170 RTP/AVP 0

    m=video 51372 RTP/AVP 31

    m=application 32416 udp wb

    a=orient:portrait

 

 

Example 4 : Video Over IMS

 

    v=0

    o=sip:001010123456789@ims.mnc01.mcc001.3gppnetwork.org 3670975210 3670975210 IN IP6 2001:0:0:1::11

    s=-

    c=IN IP6 2001:0:0:1::11

    t=0 0

    m=audio 50012 RTP/AVP 97 98 99 100 101 102

    b=AS:49

    b=RS:0

    b=RR:1200

    a=rtpmap:97 AMR-WB/16000/1

    a=fmtp:97 mode-change-capability=2

    a=rtpmap:98 AMR-WB/16000/1

    a=fmtp:98 octet-align=1; mode-change-capability=2

    a=rtpmap:99 telephone-event/16000

    a=fmtp:99 0-15

    a=rtpmap:100 AMR/8000/1

    a=fmtp:100 mode-change-capability=2

    a=rtpmap:101 AMR/8000/1

    a=fmtp:101 octet-align=1; mode-change-capability=2

    a=rtpmap:102 telephone-event/8000

    a=fmtp:102 0-15

    a=curr:qos local none

    a=curr:qos remote none

    a=des:qos mandatory local sendrecv

    a=des:qos optional remote sendrecv

    a=sendrecv

    a=ptime:60

    a=maxptime:60

    m=video 49152 RTP/AVP 104 105

    c=IN IP6 2001::1:79bf:d746:a887:c550

    b=AS:416

    b=RS:0

    b=RR:3000

    a=rtpmap:104 H264/90000

    a=fmtp:104 profile-level-id=42E00C; packetization-mode=1; sprop-parameter-sets=Z0KADNoPCmgG0KE1,aM4G4g==

    a=rtpmap:105 H264/90000

    a=fmtp:105 profile-level-id=42E00C; packetization-mode=1; sprop-parameter-sets=Z0LADOkCg/QDwiEagA==,aM4G4g==

    a=rtcp-fb:* nack

    a=rtcp-fb:* nack pli

    a=rtcp-fb:* ccm fir

    a=rtcp-fb:* ccm tmmbr

    a=curr:qos local none

    a=curr:qos remote none

    a=des:qos mandatory local sendre9>optional remote sendrecv

    a=sendrecv

    a=tcap:1 RTP/AVPF

    a=pcfg:1 t=1

    a=framesize:104 240-320

    a=framesize:105 320-240

    a=framerate:15

    a=extmap:4 urn:3gpp:video-orientation

 

 

Specification Requirement

 

< 3GPP 26.114 >

 

6.2.2 Speech

6.2.3 Video

Annex A : Examples of SDP offers and answers

 

 

< GSMA IR.92 >

 

2.4.3 Voice Media Considerations

  • The Session Description Protocol (SDP) offer/answer for voice media must be formatted as specified in Section 6.2.2 of 3GPP TS 26.114, with the restrictions included in the present document.