0

我正在尝试在不同的网络中远程连接两个客户端,并且我的 IceCandidateConnection 状态为失败。我正在使用 coturn 服务器作为仅接受 UDP 和 stun 服务器的轮流。以下是我得到的日志:firefox的webrtc:

候选人日志:

PeerConnection ID:1523297273518693(id=2147483737 url= https://eskns.com/virtualchat

冰统计

在此处输入图像描述

ICE 重启:0
ICE 回滚:0

所有原始候选人

SDP 本地 SDP(优惠)

v=0  
o=mozilla...THIS_IS_SDPARTA-59.0.2 7830508841574298961 0 IN IP4 0.0.0.0  
s=-  
t=0 0
a=sendrecv  
a=fingerprint:sha-256  E2:AD:A2:2B:69:FC:62:C8:7E:2B:8E:A9:BE:72:8E:6F:65:9D:9E:75:47:3C:6E:8B:C5:8D:36:96:89:45:63:0F  
a=group:BUNDLE sdparta_0 sdparta_1  
a=ice-options:trickle  
a=msid-semantic:WMS *  
m=audio 27078 UDP/TLS/RTP/SAVPF 109 9 0 8 101  
c=IN IP4 131.95.1.135  
a=candidate:0 1 UDP 2122252543 10.16.24.19 51599 typ host  
a=candidate:4 1 UDP 2122187007 10.8.0.26 44981 typ host  
a=candidate:8 1 TCP 2105524479 10.16.24.19 9 typ host tcptype active  
a=candidate:9 1 TCP 2105458943 10.8.0.26 9 typ host tcptype active  
a=candidate:0 2 UDP 2122252542 10.16.24.19 60111 typ host  
a=candidate:4 2 UDP 2122187006 10.8.0.26 43187 typ host  
a=candidate:8 2 TCP 2105524478 10.16.24.19 9 typ host tcptype active  
a=candidate:9 2 TCP 2105458942 10.8.0.26 9 typ host tcptype active  
a=candidate:1 1 UDP 1686052863 131.95.1.135 27078 typ srflx raddr 10.16.24.19 rport 51599  
a=candidate:1 2 UDP 1686052862 131.95.1.135 65529 typ srflx raddr 10.16.24.19 rport 60111  
a=sendrecv  
a=end-of-candidates  
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level  
a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:mid  
a=fmtp:109 maxplaybackrate=48000;stereo=1;useinbandfec=1  
a=fmtp:101 0-15  
a=ice-pwd:b8213a6bb9067addde51fcbe6062b810  
a=ice-ufrag:406caa0f  
a=mid:sdparta_0  
a=msid:{6e3aae13-8330-40f2-bb64-8340b96e7bff} {270b0330-ad95-47c5-8358-df76c55d07b8}  
a=rtcp:65529 IN IP4 131.95.1.135  
a=rtcp-mux  
a=rtpmap:109 opus/48000/2  
a=rtpmap:9 G722/8000/1  
a=rtpmap:0 PCMU/8000  
a=rtpmap:8 PCMA/8000  
a=rtpmap:101 telephone-event/8000  
a=setup:actpass  
a=ssrc:2797382455 cname:{5a3d45da-59c4-45f7-848a-70253293396f}  
m=video 27078 UDP/TLS/RTP/SAVPF 120 121 126 97  
c=IN IP4 131.95.1.135   
a=candidate:0 1 UDP 2122252543 10.16.24.19 35785 typ host  
a=candidate:4 1 UDP 2122187007 10.8.0.26 60461 typ host  
a=candidate:8 1 TCP 2105524479 10.16.24.19 9 typ host tcptype active  
a=candidate:9 1 TCP 2105458943 10.8.0.26 9 typ host tcptype active  
a=candidate:0 2 UDP 2122252542 10.16.24.19 57521 typ host  
a=candidate:4 2 UDP 2122187006 10.8.0.26 54431 typ host  
a=candidate:8 2 TCP 2105524478 10.16.24.19 9 typ host tcptype active  
a=candidate:9 2 TCP 2105458942 10.8.0.26 9 typ host tcptype active  
a=candidate:1 1 UDP 1686052863 131.95.1.135 25133 typ srflx raddr 10.16.24.19 rport 35785  
a=candidate:1 2 UDP 1686052862 131.95.1.135 2479 typ srflx raddr 10.16.24.19 rport 57521  
a=sendrecv  
a=extmap:1 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time  
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset  
a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid  
a=fmtp:126 profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1  
a=fmtp:97 profile-level-id=42e01f;level-asymmetry-allowed=1  
a=fmtp:120 max-fs=12288;max-fr=60  
a=fmtp:121 max-fs=12288;max-fr=60  
a=ice-pwd:b8213a6bb9067addde51fcbe6062b810  
a=ice-ufrag:406caa0f  
a=mid:sdparta_1  
a=msid:{6e3aae13-8330-40f2-bb64-8340b96e7bff} {af0a6de2-d397-44a2-96d9-35892b910b96}  
a=rtcp:2479 IN IP4 131.95.1.135  
a=rtcp-fb:120 nack  
a=rtcp-fb:120 nack pli  
a=rtcp-fb:120 ccm fir  
a=rtcp-fb:120 goog-remb  
a=rtcp-fb:121 nack  
a=rtcp-fb:121 nack pli  
a=rtcp-fb:121 ccm fir  
a=rtcp-fb:121 goog-remb  
a=rtcp-fb:126 nack  
a=rtcp-fb:126 nack pli  
a=rtcp-fb:126 ccm fir  
a=rtcp-fb:126 goog-remb  
a=rtcp-fb:97 nack  
a=rtcp-fb:97 nack pli  
a=rtcp-fb:97 ccm fir  
a=rtcp-fb:97 goog-remb  
a=rtcp-mux  
a=rtpmap:120 VP8/90000  
a=rtpmap:121 VP9/90000  
a=rtpmap:126 H264/90000  
a=rtpmap:97 H264/90000  
a=setup:actpass  
a=ssrc:3732981129 cname:{5a3d45da-59c4-45f7-848a-70253293396f} 

远程 SDP(答案)

v=0  
o=mozilla...THIS_IS_SDPARTA-59.0.1 281040868006921328 0 IN IP4 0.0.0.0  
s=-  
t=0 0  
a=sendrecv  
a=fingerprint:sha-256  41:33:78:18:DD:1F:D4:B6:57:53:51:AC:33:A1:D9:9A:2C:4E:CD:BB:B1:4E:2A:C2:46:50:4F:3C:12:1B:97:D3  
a=group:BUNDLE sdparta_0 sdparta_1  
a=ice-options:trickle  
a=msid-semantic:WMS *  
m=audio 9 UDP/TLS/RTP/SAVPF 109 101  
c=IN IP4 0.0.0.0  
a=candidate:0 1 UDP 2122121471 172.20.10.2 36494 typ host  
a=candidate:4 1 UDP 2122187007 2607:fb90:25db:782e:5d87:2875:6a4c:3825 38435 typ host  
a=candidate:8 1 UDP 2122252543 2607:fb90:25db:782e:5271:9af0:dc72:8551 45831 typ host  
a=candidate:12 1 TCP 2105393407 172.20.10.2 9 typ host tcptype active  
a=candidate:13 1 TCP 2105458943 2607:fb90:25db:782e:5d87:2875:6a4c:3825 9 typ host tcptype active  
a=candidate:14 1 TCP 2105524479 2607:fb90:25db:782e:5271:9af0:dc72:8551 9 typ host tcptype active  
a=candidate:1 1 UDP 1685921791 208.54.85.179 31566 typ srflx raddr 172.20.10.2 rport 36494  
a=sendrecv  
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level  
a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:mid  
a=fmtp:109 maxplaybackrate=48000;stereo=1;useinbandfec=1  
a=fmtp:101 0-15  
a=ice-pwd:a2d690bfd141de1c3bfe0cad8a75b956  
a=ice-ufrag:7219417e  
a=mid:sdparta_0  
a=msid:{b4292e14-ea0a-4ef4-bc14-5402cf2c4897} {a033f58f-6174-4950-ab43-17e841a288ea}  
a=rtcp-mux  
a=rtpmap:109 opus/48000/2  
a=rtpmap:101 telephone-event/8000  
a=setup:active  
a=ssrc:1881908549 cname:{b4fa8c04-a207-4092-b554-95a5f71e8ad3}  
m=video 9 UDP/TLS/RTP/SAVPF 120  
c=IN IP4 0.0.0.0  
a=sendrecv  
a=extmap:1 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time  
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset  
a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid  
a=fmtp:120 max-fs=12288;max-fr=60  
a=ice-pwd:a2d690bfd141de1c3bfe0cad8a75b956  
a=ice-ufrag:7219417e  
a=mid:sdparta_1  
a=msid:{b4292e14-ea0a-4ef4-bc14-5402cf2c4897} {17b818a8-855c-4e06-a36c-8c9dd10f33d8}  
a=rtcp-fb:120 nack  
a=rtcp-fb:120 nack pli  
a=rtcp-fb:120 ccm fir  
a=rtcp-fb:120 goog-remb  
a=rtcp-mux  
a=rtpmap:120 VP8/90000  
a=setup:active  
a=ssrc:553664470 cname:{b4fa8c04-a207-4092-b554-95a5f71e8ad3}  

RTP 统计
outbound_rtcp_video_1
本地:10:26:31 GMT-0600 (CST) inbound-rtp SSRC:3732981129

inbound_rtp_audio_2
本地:13:08:37 GMT-0500 (CDT) inbound-rtp SSRC:0

inbound_rtp_video_3
本地:13:08:37 GMT-0500 (CDT) inbound-rtp SSRC:553664470

outbound_rtp_audio_0
本地:13:08:37 GMT-0500 (CDT) outbound-rtp SSRC:2797382455

outbound_rtp_video_1
本地:13:08:37 GMT-0500 (CDT) outbound-rtp SSRC:3732981129

远程:10:26:31 GMT-0600 (CST) 入站-rtp SSRC:3732981129

4

1 回答 1

1

你要么没有使用 TURN 服务器,要么没有使用正确的凭据——否则你会得到 type=relay 的候选人。有些类型的网络需要 TURN 服务器。

于 2018-04-10T10:06:31.603 回答