JS and PYTHON communication are available in the LAN, and the Internet connection fails #1077
Unanswered
sunpeng222
asked this question in
Q&A
Replies: 1 comment
-
Did you manage to get a solution for this. I'm facing the same problem. On LAN I am able to establish a peer to peer connection and stream audio. But once I switch both devices to different networks the ice connection fails. I checked that both servers can connect to TURN/STUN server. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I encountered a problem. When I used JS and python to establish a webrtc connection, which is the official case, there was no problem in the LAN, but when both ends accessed through the Internet, the connection failed.
Also through the Internet, I can use JS for webrtc communication at both ends without problems. I have also added STUN and TURN services. Why?
python offer:
"v=0\r\no=- 3919480977 3919480977 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1\r\na=msid-semantic:WMS *\r\nm=audio 49967 UDP/TLS/RTP/SAVPF 96 0 8\r\nc=IN IP4 2.0.0.1\r\na=sendrecv\r\na=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=mid:0\r\na=msid:36e37a3d-1145-465e-9852-cdfd9d8aeb2c 7327020d-f97c-4146-b63f-d8752bb472d2\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=rtcp-mux\r\na=ssrc:183057379 cname:208f7f47-a338-470d-99ea-4ae7c3265b2e\r\na=rtpmap:96 opus/48000/2\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=candidate:6503122b1eaabb7263926460c5042eb2 1 udp 2130706431 2.0.0.1 49967 typ host\r\na=candidate:ace70fc1472ae60ae67cdc29ada8deb9 1 udp 2130706431 2409:8900:2fe:fcd:b92f:d5a6:8f4e:76b1 49969 typ host\r\na=candidate:f3bc63604bcbc74114fe14b78c932147 1 udp 2130706431 2409:8900:2fe:fcd:2407:bfce:3a98:6d58 49971 typ host\r\na=candidate:2d04dc5b71e8a6ef734210909ae09e3c 1 udp 2130706431 172.20.10.7 49973 typ host\r\na=candidate:6461f946d320af3f7ff22d8a1760894e 1 udp 1694498815 223.104.41.34 60698 typ srflx raddr 172.20.10.7 rport 49973\r\na=candidate:f6dcb4752b86534fde67cc0e30aaf147 1 udp 16777215 54.37.76.82 53374 typ relay raddr 172.20.10.7 rport 53309\r\na=end-of-candidates\r\na=ice-ufrag:VgN0\r\na=ice-pwd:Vg9UPi2fzOu0cqXneQhm1n\r\na=fingerprint:sha-256 D7:34:8F:43:F5:78:5C:82:05:7F:DB:64:92:C5:DE:F4:4B:F0:DF:D5:90:F0:A5:E8:E0:0E:9A:D4:0F:D6:64:BA\r\na=setup:actpass\r\nm=video 49968 UDP/TLS/RTP/SAVPF 97 98 99 100 101 102\r\nc=IN IP4 2.0.0.1\r\na=sendrecv\r\na=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=mid:1\r\na=msid:36e37a3d-1145-465e-9852-cdfd9d8aeb2c f9248648-ccb6-46ed-b532-f11f1ba31955\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=rtcp-mux\r\na=ssrc-group:FID 2428539296 2414741382\r\na=ssrc:2428539296 cname:208f7f47-a338-470d-99ea-4ae7c3265b2e\r\na=ssrc:2414741382 cname:208f7f47-a338-470d-99ea-4ae7c3265b2e\r\na=rtpmap:97 VP8/90000\r\na=rtcp-fb:97 nack\r\na=rtcp-fb:97 nack pli\r\na=rtcp-fb:97 goog-remb\r\na=rtpmap:98 rtx/90000\r\na=fmtp:98 apt=97\r\na=rtpmap:99 H264/90000\r\na=rtcp-fb:99 nack\r\na=rtcp-fb:99 nack pli\r\na=rtcp-fb:99 goog-remb\r\na=fmtp:99 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f\r\na=rtpmap:100 rtx/90000\r\na=fmtp:100 apt=99\r\na=rtpmap:101 H264/90000\r\na=rtcp-fb:101 nack\r\na=rtcp-fb:101 nack pli\r\na=rtcp-fb:101 goog-remb\r\na=fmtp:101 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:102 rtx/90000\r\na=fmtp:102 apt=101\r\na=candidate:6503122b1eaabb7263926460c5042eb2 1 udp 2130706431 2.0.0.1 49968 typ host\r\na=candidate:ace70fc1472ae60ae67cdc29ada8deb9 1 udp 2130706431 2409:8900:2fe:fcd:b92f:d5a6:8f4e:76b1 49970 typ host\r\na=candidate:f3bc63604bcbc74114fe14b78c932147 1 udp 2130706431 2409:8900:2fe:fcd:2407:bfce:3a98:6d58 49972 typ host\r\na=candidate:2d04dc5b71e8a6ef734210909ae09e3c 1 udp 2130706431 172.20.10.7 49974 typ host\r\na=candidate:6461f946d320af3f7ff22d8a1760894e 1 udp 1694498815 223.104.41.34 55705 typ srflx raddr 172.20.10.7 rport 49974\r\na=candidate:f6dcb4752b86534fde67cc0e30aaf147 1 udp 16777215 54.37.76.82 59614 typ relay raddr 172.20.10.7 rport 53308\r\na=end-of-candidates\r\na=ice-ufrag:I44C\r\na=ice-pwd:KDJpsKJduCPSuMOhgVYeuH\r\na=fingerprint:sha-256 D7:34:8F:43:F5:78:5C:82:05:7F:DB:64:92:C5:DE:F4:4B:F0:DF:D5:90:F0:A5:E8:E0:0E:9A:D4:0F:D6:64:BA\r\na=setup:actpass\r\n"
web answer:
"v=0\r\no=- 3919480977 3919480977 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1\r\na=msid-semantic:WMS *\r\nm=audio 49967 UDP/TLS/RTP/SAVPF 96 0 8\r\nc=IN IP4 2.0.0.1\r\na=sendrecv\r\na=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=mid:0\r\na=msid:36e37a3d-1145-465e-9852-cdfd9d8aeb2c 7327020d-f97c-4146-b63f-d8752bb472d2\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=rtcp-mux\r\na=ssrc:183057379 cname:208f7f47-a338-470d-99ea-4ae7c3265b2e\r\na=rtpmap:96 opus/48000/2\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=candidate:6503122b1eaabb7263926460c5042eb2 1 udp 2130706431 2.0.0.1 49967 typ host\r\na=candidate:ace70fc1472ae60ae67cdc29ada8deb9 1 udp 2130706431 2409:8900:2fe:fcd:b92f:d5a6:8f4e:76b1 49969 typ host\r\na=candidate:f3bc63604bcbc74114fe14b78c932147 1 udp 2130706431 2409:8900:2fe:fcd:2407:bfce:3a98:6d58 49971 typ host\r\na=candidate:2d04dc5b71e8a6ef734210909ae09e3c 1 udp 2130706431 172.20.10.7 49973 typ host\r\na=candidate:6461f946d320af3f7ff22d8a1760894e 1 udp 1694498815 223.104.41.34 60698 typ srflx raddr 172.20.10.7 rport 49973\r\na=candidate:f6dcb4752b86534fde67cc0e30aaf147 1 udp 16777215 54.37.76.82 53374 typ relay raddr 172.20.10.7 rport 53309\r\na=end-of-candidates\r\na=ice-ufrag:VgN0\r\na=ice-pwd:Vg9UPi2fzOu0cqXneQhm1n\r\na=fingerprint:sha-256 D7:34:8F:43:F5:78:5C:82:05:7F:DB:64:92:C5:DE:F4:4B:F0:DF:D5:90:F0:A5:E8:E0:0E:9A:D4:0F:D6:64:BA\r\na=setup:actpass\r\nm=video 49968 UDP/TLS/RTP/SAVPF 97 98 99 100 101 102\r\nc=IN IP4 2.0.0.1\r\na=sendrecv\r\na=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=mid:1\r\na=msid:36e37a3d-1145-465e-9852-cdfd9d8aeb2c f9248648-ccb6-46ed-b532-f11f1ba31955\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=rtcp-mux\r\na=ssrc-group:FID 2428539296 2414741382\r\na=ssrc:2428539296 cname:208f7f47-a338-470d-99ea-4ae7c3265b2e\r\na=ssrc:2414741382 cname:208f7f47-a338-470d-99ea-4ae7c3265b2e\r\na=rtpmap:97 VP8/90000\r\na=rtcp-fb:97 nack\r\na=rtcp-fb:97 nack pli\r\na=rtcp-fb:97 goog-remb\r\na=rtpmap:98 rtx/90000\r\na=fmtp:98 apt=97\r\na=rtpmap:99 H264/90000\r\na=rtcp-fb:99 nack\r\na=rtcp-fb:99 nack pli\r\na=rtcp-fb:99 goog-remb\r\na=fmtp:99 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f\r\na=rtpmap:100 rtx/90000\r\na=fmtp:100 apt=99\r\na=rtpmap:101 H264/90000\r\na=rtcp-fb:101 nack\r\na=rtcp-fb:101 nack pli\r\na=rtcp-fb:101 goog-remb\r\na=fmtp:101 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:102 rtx/90000\r\na=fmtp:102 apt=101\r\na=candidate:6503122b1eaabb7263926460c5042eb2 1 udp 2130706431 2.0.0.1 49968 typ host\r\na=candidate:ace70fc1472ae60ae67cdc29ada8deb9 1 udp 2130706431 2409:8900:2fe:fcd:b92f:d5a6:8f4e:76b1 49970 typ host\r\na=candidate:f3bc63604bcbc74114fe14b78c932147 1 udp 2130706431 2409:8900:2fe:fcd:2407:bfce:3a98:6d58 49972 typ host\r\na=candidate:2d04dc5b71e8a6ef734210909ae09e3c 1 udp 2130706431 172.20.10.7 49974 typ host\r\na=candidate:6461f946d320af3f7ff22d8a1760894e 1 udp 1694498815 223.104.41.34 55705 typ srflx raddr 172.20.10.7 rport 49974\r\na=candidate:f6dcb4752b86534fde67cc0e30aaf147 1 udp 16777215 54.37.76.82 59614 typ relay raddr 172.20.10.7 rport 53308\r\na=end-of-candidates\r\na=ice-ufrag:I44C\r\na=ice-pwd:KDJpsKJduCPSuMOhgVYeuH\r\na=fingerprint:sha-256 D7:34:8F:43:F5:78:5C:82:05:7F:DB:64:92:C5:DE:F4:4B:F0:DF:D5:90:F0:A5:E8:E0:0E:9A:D4:0F:D6:64:BA\r\na=setup:actpass\r\n"
Beta Was this translation helpful? Give feedback.
All reactions