使用带有RTP / AVP的SDP媒体类型应用程序(m =应用程序<端口#=“”> RTP / AVP <有效负载>)

时间:2017-12-28 23:36:04

标签: sip freeswitch sdp

我正在尝试熟悉SIP SDP的解剖结构。以下是我的Tandberg VC部门的SDP示例。

v=0
o=tandberg 1 3 IN IP4 192.168.1.94
s=-
c=IN IP4 192.168.1.94
b=AS:768
t=0 0
m=audio 47032 RTP/AVP 97 98 99 100 101 9 15 8 0 102
b=TIAS:64000
a=rtpmap:97 MP4A-LATM/90000
a=fmtp:97 profile-level-id=24;object=23;bitrate=64000
a=rtpmap:98 MP4A-LATM/90000
a=fmtp:98 profile-level-id=24;object=23;bitrate=56000
a=rtpmap:99 MP4A-LATM/90000
a=fmtp:99 profile-level-id=24;object=23;bitrate=48000
a=rtpmap:100 G7221/16000
a=fmtp:100 bitrate=32000
a=rtpmap:101 G7221/16000
a=fmtp:101 bitrate=24000
a=rtpmap:9 G722/8000
a=rtpmap:15 G728/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:102 telephone-event/8000
a=fmtp:102 0-15
m=video 47034 RTP/AVP 122 121 120 34 31
b=TIAS:768000
a=rtpmap:122 H264-RCDO/90000
a=fmtp:122 profile-level-id=008016;max-mbps=42000;max-fs=3600;max-smbps=323500
a=rtpmap:121 H264/90000
a=fmtp:121 profile-level-id=428016;max-mbps=35000;max-fs=3600;max-smbps=323500
a=rtpmap:120 H263-1998/90000
"a=fmtp:120 custom=1280,720,3;custom=1024,768,4;custom=1024,576,2;custom=800,600,3;cif4=2;custom=720,480,2;custom=640,480,2;
custom=512,288,1;cif=1;custom=352,240,1;qcif=1;sqcif=1;maxbr=7680"
a=rtpmap:34 H263/90000
a=fmtp:34 cif4=2;cif=1;qcif=1;sqcif=1;maxbr=7680
a=rtpmap:31 H261/90000
a=fmtp:31 cif=1;qcif=1;maxbr=7680
a=rtcp-fb:* nack pli
a=content:main
a=label:11
a=answer:full
m=application 5071 UDP/BFCP *
a=floorctrl:c-s
a=confid:1
a=floorid:2 mstrm:12
a=userid:1
a=setup:passive
a=connection:new
m=video 47036 RTP/AVP 120 34 31
b=TIAS:768000
a=rtpmap:120 H263-1998/90000
"a=fmtp:120 custom=1280,720,3;custom=1024,768,4;custom=1024,576,2;custom=800,600,3;cif4=2;custom=720,480,2;custom=640,480,2;custom=512,
288,1;cif=1;custom=352,240,1;qcif=1;sqcif=1;maxbr=7680"
a=rtpmap:34 H263/90000
a=fmtp:34 cif4=2;cif=1;qcif=1;sqcif=1;maxbr=7680
a=rtpmap:31 H261/90000
a=fmtp:31 cif=1;qcif=1;maxbr=7680
a=rtcp-fb:* nack pli
a=content:slides
a=label:12
m=application 47038 RTP/AVP 103
a=rtpmap:103 H224/4800

所以我的理解是RTP / AVP协议只能用于媒体类型的音频或视频。保持这一点我不明白最后两行:

m=application 47038 RTP/AVP 103
a=rtpmap:103 H224/4800

关于他们的意思的任何想法?

2 个答案:

答案 0 :(得分:2)

  

所以我的理解是RTP / AVP协议只能用于媒体类型的音频或视频。

没有这样的限制,RFC4566表示

  

是媒体类型。目前定义的媒体是“音频”,         “视频”,“文本”,“应用程序”和“消息”,虽然此列表         将来可能会延长(见第8节)。

特定于应用程序的消息也可以通过RTP发送,例如

  

m =申请47038 RTP / AVP 103

     

a = rtpmap:103 H224 / 4800

行指的是RFC4573,它是用于远程摄像机控制的有效载荷格式。

答案 1 :(得分:1)

您使用SDP协商两个对等方之间的会话。会话可以包含多个媒体行。如果我们想在里面使用音频和视频(=视频通话),我们需要两条媒体线。基于RFC4566,媒体行被描述为:

  

m =媒体端口proto fmt ...

媒体可以是:

  

是媒体类型。目前定义的媒体是&#34; audio&#34;,         &#34;视频&#34;,&#34;文字&#34;,&#34;应用&#34;和&#34;消息&#34;,

因此,在我们的案例中,我们需要两条媒体线,一条用于音频,一条用于视频。每个媒体线描述传输协议端口(例如,用于音频的UDP),例如,收到音频。

因此在您的示例中,SDP消息的发送方想要在端口47038上接收数据包。此外,我们RTP传输信息。 AVP代表音频视频配置文件(请参阅Wikipedia)。在RTP中,我们提供了一系列预定义的编解码器编号,例如数字0代表PCM U-law。在您的情况下,您使用了多个动态范围 - &gt;我的想法是我应该能够在RTP中扩展编解码器映射。因此,RTP定义了动态编解码器编号范围(= 96-127)。 我们使用动态编解码器必须更详细地描述该编解码器。这是媒体行下方a= - 行(属性行)的工作。

RFC 4566:

  

属性是扩展SDP的主要手段。属性可以      被定义为用作&#34;会话级&#34;属性,&#34;媒体级&#34;      属性,或两者兼而有之。

     

媒体描述可能包含任意数量的属性(&#34; a =&#34;字段)      这是媒体特定的。这些被称为&#34;媒体级&#34;      属性并添加有关媒体流的信息。属性      字段也可以在第一个媒体字段之前添加;这些      &#34;会话级&#34;属性传达适用的其他信息      整个会议而不是个别媒体。

所以你a= - line描述了上面的媒体行使用H224编解码器进行RTP,其中RTP中的有效负载类型编号设置为103.我猜4800代表编解码器&# 39;采样率。

希望有所帮助。

相关问题