当我使用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来说这是不是?
问题是什么?
答案 0 :(得分:0)
更改优惠sdp
a = group:BUNDLE 0 1 至 a =组:BUNDLE视频音频
和其他0到视频; 1到音频;
答案 1 :(得分:0)
新的WebRTC库生成具有一些强制性更改的SDP。 就我而言,有几个问题:
这就是为什么我将我的FREE SWITCH sdp-answer更改为答案(新的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
答案 2 :(得分:0)
您可以更改有关音频和视频的媒体顺序
你的sdp是第一位的
答案 3 :(得分:0)
SDP 描述会话配置,包括流设置。与媒体配置(音频、视频流)相关的配置行 - 是 m 行。
如果您提供使用 2 个媒体流 a=group:BUNDLE 0 1
。 (mid:0
和 mid:1
) 那么 ANSWER 也应该包含 2 个相同的流,以便它们可以连接。
在您的情况下,您没有 group:BUNDLE
指令和 mid
流定义,这意味着无法确定如何在 OFFER 和 ANSWER 之间连接流。
您的第二方要么配置不正确但无法接收提供的流,要么使用过时的 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