내밥줄/VoIP

[펌]SDP

jjoell 2009. 1. 12. 16:46

SDP(Session Description Protocol) -IETF MMUSIC WG-

 

경기대학교 전자공학부

성동수(dssung@kyonggi.ac.kr)

 

학사 김평수(babyloop@gmail.com)

 

 

introduction

 

Session:

 멀티 미디어 세션은 멀티미디어 센더와 리시버, 그리고 센더에서 리시버로 흐르는 데이타 스트림으로 이루어 진다.

 

Session Description:

 한 멀티미디어 세션에 참여하기 위해 충분한(참여할 능력이 되는) 정보를 전달하기 위한 잘 

 정의된 포맷.

 

Session Announcement:

 Session Description 을 전달하기(알려주기) 위한 메커니즘.

 

 

SDP는...

 

 

인터넷 멀티캐스트 백본(Mbone)에서의 세션을 위한 것이다.

 

 

엠본은 ip 멀티캐스트 그리고 효율적인 많은 통신을 지원하는 인터넷 부분이다.

 

순수하게 Session Description format은 Session contents나 미디어 인코딩의 유통을 (문법적으로)지원하지 않는다.

 

SDP includes

 

Session-level description

 세션의 이름 정보

 세션 활성화 시간

 

Media-level description

 '이러한 미디어를 받을수 있다'라는 미디어포함 세션 정보

(addresses,port 등...)

 

 

1) Session-Level 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)
        b=*(bandwidth information)
        t=(time the session is active)
        r=*(zero or more repeat times)
        z=*(time zone adjustments)
        k=*(encryption key)
        a=*(zero or more session attribute lines)       

 

Applies to the whole session and all media streams

 

v : session description protocol version number.
        ex) v=0
o : origin
   o=<username><session id><version><network type>   <address type><address>
 
<username> is the user's login on the originating host, or
       it is "-" if the originating host does not support the concept of user ids.
 
      Session identifier = a globally unique identifier for the session.
        <username> <session id> <network type> <address type> <address>
 
<version> is a version number(v와는 다름) for this announcement.
 <session id><version>에 유일성을 보증하기 위해 NTP(Network Time Protocol) timestamp 방식이 제안되어 왔다. 
  
<address> is the globally unique address of the machine
          from which the session was created
        
 
ex) o=dssung 3090844526 3090844526 IN IP4 203.249.9.114
 
 
s : session name
    ex) s=SDP Seminar
 
i  : information about session or media
   The "i=" field is information about the session,
      can also be used for each media definition.
   
ex) i=A seminar on the session description protocol
 
u : URI
   a pointer to additional information about the conference.
 
    ex) u=http://kuic.kyonggi.ac.kr/~dssung/SDP.html
 
     자세한 정보가 있다.(문서,PPT자료라던지... 회의에 필요한 자료들)
 
 
e : <email address> or   p : <phone number>
 
    These specify contact information for the person responsible for the conference. 
    This is not necessarily the same person
        that created the conference announcement.
    
ex) e:dssung@kyonggi.ac.kr
 
c : connection data
   c=<network type> <address type> <connection address>
     
 각 media-level description 아니면, session-level description에 "c=" 필드가 포함되어있어야 한다.
 
두 곳에 모두 포함되어 있으면 각 the per-media value가 the session-level settings에 덮어 씌여진다. 
->media level 값이 우선시 된다. 
 
      ex) c=IN IP4 224.2.1.1
 
  Typically the connection address will be
       a class-D IP multicast group address.
 
 
b : bandwidth
 세션이나 미디어에 사용 되어지는 권장된 대역폭(정보량)을 나타낸다.
 
 
b=<modifier>:<bandwidth-value>
 
 
Two modifiers are initially defined:
     CT (Conference Total), AS (Application-Specific maximum) 
    
     CT : A maximum bandwidth is associated
               within a particular multicast administrative scope region.
-관리되는 범위지역에 개개의 멀티캐스트들을 포함하는 최대 대역폭이 지정됨. 모든 사이트안에 모든 미디어의 대역폭의 총합이다.
                  
     AS : A bandwidth figure for a single media at a single site.
-한 사이트에 한 미디어의 대역폭이다.
 
 
<bandwidth-value> is in kilobits per second.
 
t : time the session is active
  t=<start time> <stop time>
 
      ex) t=3073397496  3073404696
 
      ex) t=0 0
              the session is regarded as permanent
          즉시 시작해서 끝날 시간을 모른다. (전화 통화같은 경우)
 
 
NTP (Network Time Protocol)  timestamp : 64bit
 
  - the wallclock time
  - 32bit : NTP second
     32bit : NTP fraction
  
ex) 3.25초 : 0x0000000340000000
       NTP second : 0x00000003
       NTP fraction : 0x40000000
 
ex) 10 Nov 1995 11:33:25.125
       (3024992016.125 s)
       NTP second : 0xb44db705
       NTP fraction : 0x20000000
 
r : specify repeat times for a session
   r=<repeat interval> <active duration> <list of offsets from start-time>
 
     ex) t=3034423619 3042462419
           r=604800 3600 0 90000   (1주,1시간, 0, 25시)
   3개월간 각 주마다 월요일 10시와 화요일11시에 한시간동안 세션을 설립한다.
   <start time> = 10am on the first Monday
    the <repeat interval> would be 1 week,
    the <active duration> would be 1 hour,
    and the offsets would be zero and 25 hours.
 
 
a : Attributes
 
  Attributes are the primary means for extending SDP. 
  Attributes may  be defined to be used as session-level attributes, "media-level" attributes, or both.
 
        property attributes :  a=<flag>
        value attributes : a=<attribute>:<value>
 
1) session or media attribute
         a=recvonly     <- receive only (받기만 허용 : 세미나 청중)
         a=sendrecv    <- send and receive
                              (보내고 받기가 동시에 허용 : 다자간 회의)
         a=sendonly
2) maximum video frame rate
     This gives the maximum video frame rate in frames/sec.
     It is intended as a recommendation for the encoding of video data.
     
         a=framerate:<frame rate>
         ex) a=framerate:20
 
3) video quality
 
      Specify a 1.non-default 2.trade-off(교환조건)
          between frame-rate and still-image quality.
 
     a=quality:<quality>
       10-best still image quality, 5-default, 0-worst still image
 
4) a=ptime:<packet time>
 
       This gives the length of time in milliseconds
         represented by the media in a packet
 
   한 패킷에 있는 미디어에 의한 시간의 길이가 ms 단위로 표현된다. 
 
 
2) Media-Level Description
 
        m=(media name and transport address)
        i=*(media title)
        c=*(connection information)
        b=*(bandwidth information)
        k=*(encryption key)
        a=*(zero or more media attribute lines)

 

Applies to a single media stream

 

 
 
m : media announcements
 
   m=<media><port>/<number of ports><transport><fmt list>
 
 각 media description은 하나의 "m="필드로 시작, 다음 "m="필드(다음media description의...)로 종료되거나 session description의 끝으로 종료된다.
 
    ex) m=audio 49170 RTP/AVP 0
          m=video 51372 RTP/AVP 31
 
<media> : audio, video, application, data, control,
 
 
<port>/<number of ports>
  
  to which the media stream will be sent.
   
  ex) m=audio 49170 RTP/AVP 0
           RTP port number : 49170
           RTCP port number : 49171
 
 계층적으로 엔코드된 스트림에 어플리케이션은 unicast addresses 으로 보내진다. 이는 다중 전송에서 필요하다. 
 
     ex) m=video 49170/2 RTP/AVP 34
 
             RTP port number : 49170
           RTCP port number : 49171
  
           RTP port number : 49172
           RTCP port number : 49173
 
<transport>
 
   RTP/AVP - the Realtime Transport Protocol
      using the Audio/Video profile carried over UDP.
   Other RTP profiles can be defined in the future as RTP/XYZ.
   UDP - User Datagram Protocol
  
<fmt list>
 
   a list of payload formats
   For audio and video, these will normally be
     a media payload type as defined in the RTP Audio/Video Profile.
     ex) m=audio 49170 RTP/AVP 0   <-PCMU audio
 
 
 

RTP Audio/Video Profile

 

 
 
 payload type 리스트가 주어지면 이것들은 세션에서 쓰일것이라는거을 나타낸다.
처음의 포맷은 세션의 디폴트 포맷(기본으로 갖춰야할 포맷)
 
          ex) m=audio 49170 RTP/AVP 0 8 4
 
 
 
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=audio 49232 RTP/AVP 98
           a=rtpmap:98 L16/16000/2
 
rtpmap attribute
  a=rtpmap:<payload type>
       <encoding name>/<clock rate>[/<encoding parameters>]
       
         For audio streams, <encoding parameters> may specify
           the number of audio channels.

 

[출처] http://cafe.daum.net/swingmaster/jTs/60?docid=SD4r|jTs|60|20071224162839&q=asterisk%20%20pbx&srchid=CCBSD4r|jTs|60|20071224162839

'내밥줄 > VoIP' 카테고리의 다른 글

[펌] SIP, SDP  (0) 2009.01.12
[펌] asterisk를 통한 외부통화   (0) 2009.01.12
[펌] asterisk를 이용한 내선통화  (0) 2009.01.12
[펌] Asterisk 설치  (0) 2009.01.12
[스크랩] Open Source SIP stacks compared  (0) 2009.01.06