Android WebRTC 答案中 m 行的顺序与提供的顺序不匹配。拒绝答案



当我使用android webrtc呼叫freeswitch错误时答案中M线的顺序与所提供的顺序不符。拒绝答案。(Invalid_Parameter(。

关注是调用SDP

为什么我不能提交这个问题?

这是我的报价SDP

v=0
o=- 4052293091244096016 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1
a=msid-semantic: WMS ARDAMS
m=video 47730 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 125 104
c=IN IP4 192.168.2.229
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:3161858559 1 udp 2122260223 192.168.2.229 47730 typ host generation 0 network-id 3 network-cost 10
a=ice-ufrag:ScCb
a=ice-pwd:1hsQIC6Z2q6DW3rf5S9ZAO17
a=ice-options:trickle renomination
a=fingerprint:sha-256 1F:6C:75:E4:BB:A8:E9:76:A7:03:80:61:F7:31:C1:FC:CB:12:61:00:63:10:82:30:97:4D:53:B6:91:93:84:0B
a=setup:actpass
a=mid:0
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:4 urn:3gpp:video-orientation
a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=sendrecv
a=msid:ARDAMS ARDAMSv0
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 H264/90000
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:127 red/90000
a=rtpmap:125 rtx/90000
a=fmtp:125 apt=127
a=rtpmap:104 ulpfec/90000
a=ssrc-group:FID 457939972 2191745282
a=ssrc:457939972 cname:24CAMrcezDreoUPY
a=ssrc:457939972 msid:ARDAMS ARDAMSv0
a=ssrc:457939972 mslabel:ARDAMS
a=ssrc:457939972 label:ARDAMSv0
a=ssrc:2191745282 cname:24CAMrcezDreoUPY
a=ssrc:2191745282 msid:ARDAMS ARDAMSv0
a=ssrc:2191745282 mslabel:ARDAMS
a=ssrc:2191745282 label:ARDAMSv0
m=audio 41823 UDP/TLS/RTP/SAVPF 111 103 9 102 0 8 105 13 110 113 126
c=IN IP4 192.168.2.229
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:3161858559 1 udp 2122260223 192.168.2.229 41823 typ host generation 0 network-id 3 network-cost 10
a=ice-ufrag:ScCb
a=ice-pwd:1hsQIC6Z2q6DW3rf5S9ZAO17
a=ice-options:trickle renomination
a=fingerprint:sha-256 1F:6C:75:E4:BB:A8:E9:76:A7:03:80:61:F7:31:C1:FC:CB:12:61:00:63:10:82:30:97:4D:53:B6:91:93:84:0B
a=setup:actpass
a=mid:1
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=sendrecv
a=msid:ARDAMS ARDAMSa0
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:9 G722/8000
a=rtpmap:102 ILBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:2445336154 cname:24CAMrcezDreoUPY
a=ssrc:2445336154 msid:ARDAMS ARDAMSa0
a=ssrc:2445336154 mslabel:ARDAMS
a=ssrc:2445336154 label:ARDAMSa0

这是freeswitch答案SDP

v=0
o=FreeSWITCH 1524537898 1524537899 IN IP4 114.112.101.159
s=FreeSWITCH
c=IN IP4 114.112.101.159
t=0 0
a=msid-semantic: WMS GfaeNPVcQ4bAnPyGzrcAUcXtNirtkE3R
m=video 30234 UDP/TLS/RTP/SAVPF 96
b=AS:102400
a=rtpmap:96 VP8/90000
a=fingerprint:sha-256 EF:2C:4A:1C:DA:70:3F:C2:26:70:CB:19:B3:96:BF:17:F0:46:EB:1A:A6:C1:34:2D:F2:FD:2B:EE:49:62:DA:1E
a=setup:active
a=rtcp-mux
a=rtcp:30234 IN IP4 114.112.101.159
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=ssrc:2979419963 cname:K4WoJHqpBsQP7emx
a=ssrc:2979419963 msid:GfaeNPVcQ4bAnPyGzrcAUcXtNirtkE3R v0
a=ssrc:2979419963 mslabel:GfaeNPVcQ4bAnPyGzrcAUcXtNirtkE3R
a=ssrc:2979419963 label:GfaeNPVcQ4bAnPyGzrcAUcXtNirtkE3Rv0
a=ice-ufrag:voXgrLA4TRn3mhLX
a=ice-pwd:bxbL4s1wKHcIMo58DTeUuFPd
a=candidate:9062859322 1 udp 659136 114.112.101.159 30234 typ host generation 0
a=end-of-candidates
m=audio 17628 UDP/TLS/RTP/SAVPF 111 110
a=rtpmap:111 opus/48000/2
a=fmtp:111 useinbandfec=1; minptime=10
a=rtpmap:110 telephone-event/48000
a=ptime:20
a=fingerprint:sha-256 EF:2C:4A:1C:DA:70:3F:C2:26:70:CB:19:B3:96:BF:17:F0:46:EB:1A:A6:C1:34:2D:F2:FD:2B:EE:49:62:DA:1E
a=setup:active
a=rtcp-mux
a=rtcp:17628 IN IP4 114.112.101.159
a=ice-ufrag:N0HFnicpQPELN7uR
a=ice-pwd:SPnxSArP0rneuju891DnaGCQ
a=candidate:0012605909 1 udp 659136 114.112.101.159 17628 typ host generation 0
a=end-of-candidates
a=ssrc:3741676838 cname:K4WoJHqpBsQP7emx
a=ssrc:3741676838 msid:GfaeNPVcQ4bAnPyGzrcAUcXtNirtkE3R a0
a=ssrc:3741676838 mslabel:GfaeNPVcQ4bAnPyGzrcAUcXtNirtkE3R
a=ssrc:3741676838 label:GfaeNPVcQ4bAnPyGzrcAUcXtNirtkE3Ra0

这是webrtc的bu?

怎么了?

新WebRTC库生成具有一些强制性更改的SDP。就我而言,有几个问题:

  1. 自由开关SDP-ASWER中的行顺序
  2. 自由开关SDP-ASWER中不存在一些行

这就是为什么我将自由开关SDP-ASWER更改为答案(新Webrtc库(

检查您的答案是否包含这些行

a=group:BUNDLE 0
a=mid:0
a=sendrecv

这是正确答案的示例

v=0
o=FreeSWITCH 1538507700 1538507701 IN IP4 xxx.xxx.xxx.xxx
s=FreeSWITCH
c=IN IP4 xxx.xxx.xxx.xxx
t=0 0
a=group:BUNDLE 0
a=msid-semantic: WMS r79J1Y6SlYKAs3yPp3iawocKYi2MHeLY
m=audio 55748 UDP/TLS/RTP/SAVPF 111 110 106
a=rtpmap:111 opus/48000/2
a=fmtp:111 useinbandfec=1; minptime=10
a=rtpmap:110 telephone-event/8000
a=rtpmap:106 CN/8000
a=ptime:20
a=fingerprint:sha-256 37:E6:36:30:65:A0:AF:EF:37:C7:36:5E:45:6B:4F:56:AC:EE:50:F5:9A:5F:9A:73:D3:0A:6B:3A:78:F5:30:AE
a=setup:active
a=mid:0
a=sendrecv
a=rtcp-mux
a=rtcp:55748 IN IP4 xxx.xxx.xxx.xxx
a=ssrc:1540601138 cname:bKx3yuMJim9Bfyhv
a=ssrc:1540601138 msid:r79J1Y6SlYKAs3yPp3iawocKYi2MHeLY a0
a=ssrc:1540601138 mslabel:r79J1Y6SlYKAs3yPp3iawocKYi2MHeLY
a=ssrc:1540601138 label:r79J1Y6SlYKAs3yPp3iawocKYi2MHeLYa0
a=ice-ufrag:spwPEyptHi5enG3p
a=ice-pwd:hqjFLVfT8ekeDszVHVBckQvS

更改优惠SDP

a =组:束0 1到A =组:捆绑视频音频

和其他0到视频;1到音频;

您可以更改有关音频和视频的媒体顺序

您的SDP是第一个

sdp描述了包括流设置的会话配置。与媒体配置有关的配置行(音频,视频流( - 是m -lines。

如果您提供2个媒体流a=group:BUNDLE 0 1。(mid:0mid:1(然后答案还应包含2个相同的流,以便它们可以连接。

在您的情况下,您没有group:BUNDLE指令,也没有mid流定义,这意味着无法确定如何在要约和答案之间连接流。您的第二方要么错误地配置了,尽管无法接收所提供的流,要么使用过时的WEBRTC版本。

链接到有关SDP参数和结构描述的更多信息:

https://webrtchacks.com/sdp-anatomy/

https://webrtchacks.com/update-anatomy-webrtc-sdp-anton-roman/

其他不正确的配置示例:

OFFER:
....other fields...
a=group:BUNDLE 0 1 2 3
....
a=mid:0
.....
a=mid:1
.....
a=mid:2
.....
a=mid:3

ANSWER:
....other fields...
a=group:BUNDLE 0 1
....
a=mid:0
.....
a=mid:1

最新更新