2

我正在开发一个 WebRTC 呼叫应用程序,但我遇到了一些奇怪的问题。我选择 PeerJS 是为了让所有的开发变得更容易,而且效果很好。

但是在 Android 和 Crosswalk(Wifi 到 3G)上进行网络切换时,我遇到了一个奇怪的问题。

问题是我可以通过 Wifi 从一端向另一端拨打电话,并且可以按预期工作。然后我在一端切换到3G,打另一个电话,它不工作。

问题是,当它在 3G 上工作时,一端没有接收到中继候选。所以它回答主持人候选人,但不转发我想要的候选人。

{"type":"OFFER","payload":{"sdp":{"type":"offer","sdp":"v=0\r\no=- 9207325897229143904 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio\r\na=msid-semantic: WMS sEJdVRbesv0A43zVIHpsjpBP97JHsJsnvIXh\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 9 0 8 106 105 13 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:XayiDeo/VebqhfvU\r\na=ice-pwd:nlhMhUoDBuMhQjeN7gVzmDZA\r\na=fingerprint:sha-256 A4:12:DA:AD:0F:60:63:F1:A8:50:C2:57:98:89:ED:77:43:B4:CF:2E:AA:F5:53:A7:90:97:12:B6:58:82:27:1F\r\na=setup:actpass\r\na=mid:audio\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=sendrecv\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=fmtp:111 minptime=10; useinbandfec=1\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 CN/32000\r\na=rtpmap:105 CN/16000\r\na=rtpmap:13 CN/8000\r\na=rtpmap:126 telephone-event/8000\r\na=maxptime:60\r\na=ssrc:157434490 cname:qDTW7PBlwzV52rEW\r\na=ssrc:157434490 msid:sEJdVRbesv0A43zVIHpsjpBP97JHsJsnvIXh fa7fe6f0-5372-4573-a76d-09ff3bd18948\r\na=ssrc:157434490 mslabel:sEJdVRbesv0A43zVIHpsjpBP97JHsJsnvIXh\r\na=ssrc:157434490 label:fa7fe6f0-5372-4573-a76d-09ff3bd18948\r\n"},"type":"media","connectionId":"mc_00787gz767gmn29","browser":"Chrome"},"dst":"ZUQn45fuzC"}

{"type":"CANDIDATE","payload":{"candidate":{"candidate":"candidate:3747612131 1 tcp 1518280447 192.168.1.42 0 typ host tcptype active generation 0","sdpMid":"audio","sdpMLineIndex":0},"type":"media","connectionId":"mc_00787gz767gmn29"},"dst":"ZUQn45fuzC"}

{"type":"CANDIDATE","payload":{"candidate":{"candidate":"candidate:3747612131 2 tcp 1518280446 192.168.1.42 0 typ host tcptype active generation 0","sdpMid":"audio","sdpMLineIndex":0},"type":"media","connectionId":"mc_00787gz767gmn29"},"dst":"ZUQn45fuzC"}

{"type":"ANSWER","src":"ZUQn45fuzC","dst":"ZUQn45fuzC-908sf","payload":{"sdp":{"type":"answer","sdp":"v=0\r\no=- 4572206596343832202 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio\r\na=msid-semantic: WMS vd1JxmlIr4LBan1PD5paXYyHfyUhw1vEJY3k\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 9 0 8 106 105 13 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:mu+gTMWn5JTLdZvc\r\na=ice-pwd:jKodikIYat7TmAFstDOMkYLy\r\na=fingerprint:sha-256 7B:95:5E:62:D3:09:E3:39:45:F2:03:54:40:07:17:1A:55:61:6D:AC:F0:B1:0E:95:2E:89:A0:D4:F6:8D:D7:BC\r\na=setup:active\r\na=mid:audio\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=sendrecv\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=fmtp:111 minptime=10; useinbandfec=1\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 CN/32000\r\na=rtpmap:105 CN/16000\r\na=rtpmap:13 CN/8000\r\na=rtpmap:126 telephone-event/8000\r\na=maxptime:60\r\na=ssrc:4261079885 cname:A48eZP6Rm+hQeX2p\r\na=ssrc:4261079885 msid:vd1JxmlIr4LBan1PD5paXYyHfyUhw1vEJY3k 60fbeb3f-0baf-4871-8be3-a5a2b002f4b0\r\na=ssrc:4261079885 mslabel:vd1JxmlIr4LBan1PD5paXYyHfyUhw1vEJY3k\r\na=ssrc:4261079885 label:60fbeb3f-0baf-4871-8be3-a5a2b002f4b0\r\n"},"type":"media","connectionId":"mc_00787gz767gmn29","browser":"Chrome"}}

{"type":"CANDIDATE","src":"ZUQn45fuzC","dst":"ZUQn45fuzC-908sf","payload":{"candidate":{"candidate":"candidate:1189248530 1 udp 2122260223 192.168.1.49 40726 typ host generation 0","sdpMid":"audio","sdpMLineIndex":0},"type":"media","connectionId":"mc_00787gz767gmn29"}}

{"type":"CANDIDATE","src":"ZUQn45fuzC","dst":"ZUQn45fuzC-908sf","payload":{"candidate":{"candidate":"candidate:2968651718 1 udp 1686052607 83.40.XXX.XXX 40726 typ srflx raddr 192.168.1.49 rport 40726 generation 0","sdpMid":"audio","sdpMLineIndex":0},"type":"media","connectionId":"mc_00787gz767gmn29"}}

{"type":"CANDIDATE","src":"ZUQn45fuzC","dst":"ZUQn45fuzC-908sf","payload":{"candidate":{"candidate":"candidate:140608226 1 tcp 1518280447 192.168.1.49 0 typ host tcptype active generation 0","sdpMid":"audio","sdpMLineIndex":0},"type":"media","connectionId":"mc_00787gz767gmn29"}}

{"type":"CANDIDATE","src":"ZUQn45fuzC","dst":"ZUQn45fuzC-908sf","payload":{"candidate":{"candidate":"candidate:729144661 1 udp 41885439 188.XXX.XXX.XXX 49360 typ relay raddr 83.40.XXX.XXX rport 40726 generation 0","sdpMid":"audio","sdpMLineIndex":0},"type":"media","connectionId":"mc_00787gz767gmn29"}}

我用这个功能测试了TURN服务器和设备之间的连接,它告诉我turn服务器不可用。当我切换回 Wifi 时,一切正常。

带有WebRTC的android人行横道有什么问题吗?这里会发生什么?我有人行横道版本 18。

谢谢!

4

0 回答 0