RTCPeerConfig TURN not working
See original GitHub issueExpected behavior
JSXC user 1 make a video call to another JSXC user 2
Actual behavior
JSXC user 1 can not make a video call to another JSXC user 2
Steps to reproduce the behavior
- Configure JSXC with RTCPeerConfig:
RTCPeerConfig: {
/** Time-to-live for config from url */
ttl: 3600,
/** [optional] If set, jsxc requests and uses RTCPeerConfig from this url */
url: null,
/** If true, jsxc send cookies when requesting RTCPeerConfig from the url above */
withCredentials: false,
/** ICE servers like defined in http://www.w3.org/TR/webrtc/#idl-def-RTCIceServer */
iceServers: [{
urls: 'turn:numb.viagenie.ca',
username: 'splot_bill@hotmail.com',
credential: '123456',
credentialType: 'password'
}]
}
- Try to make a video call
- Video call does not work
Environment
- JSXC version: commit fc8e08527858fbed502246a25eb1420ecb8ffce7
- Host system and version: Ubuntu 16.04 server 64bits (ejabberd). The servers and clients are behind a proxy to access internet.
- Browser vendor and version: User 1 Chrome Versão 59.0.3071.115 (Versão oficial) 64 bits; User 2 Chrome Versão 59.0.3071.115 (Versão oficial) 64 bits
- Any browser plugins enabled? User 1 Activated Extensions (AngularJS Console 0.2, Documentos Google off-line, Google Apresentações 0.9, Google Docs 0.9, JSON Formatter 0.6.0, Memory Match 1.0, ng-inspector for AngularJS 0.5.10, ng-inspector for AngularJS 0.5.10, Planilhas do Google 1.1, Página inicial avançada 2.1.1, REST Console 4.0.2, Restlet Client - REST API Testing 2.5.2, Save to Pocket 2.1.41, Tamper Chrome (extension) 1.3.2, Toggl Button: Productivity & Time Tracker 1.3.0, Vysor 1.8.0); User 2 Activated Extensions (Documentos Google off-line 1.4, Google Apresentações 0.9, Google Docs 0.9, Planilhas do Google 1.1), but I tested the video call using incognito mode too and does not work
- XMPP server vendor and version: ejabberd Version: 16.01-2 (Architecture: amd64; Ubuntu 16.04 server)
- Is your XMPP server working with other clients as expected? XMPP Server Works, just video call between users that there are not in the same network that does not work (user in the same network works video call)
Logs
Javascript
User 1:
onUserMediaSuccess
jsxc.js:183 media ready for outgoing call
jsxc.js:183 close dialog
jsxc.js:183 close dialog
User 2:
incoming call from 02633223354@10.67.125.28/30332216394602891171174904600673919011613765076971098719290
onUserMediaSuccess
jsxc.js:183 close dialog
jsxc.js:183 close dialog
jsxc.js:183 close dialog
JSXC
User 1:
onUserMediaSuccess
jsxc.js:183 media ready for outgoing call
jsxc.js:183 close dialog
jsxc.js:165 [Webrtc] Initiate call
jsxc.js:165 [JINGLE][log:info] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: Changing session state to: pending
12jsxc.js:165 [JINGLE][log:info] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: Discovered new ICE candidate
jsxc.js:165 [JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: session-info
jsxc.js:165 [JINGLE][log:info] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: Outgoing session is ringing
jsxc.js:165 [Webrtc] ringing...
jsxc.js:165 [JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: session-accept
jsxc.js:165 [JINGLE][log:info] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: Changing session state to: active
jsxc.js:165 [JINGLE][log:info] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: Changing connection state to: connecting
jsxc.js:165 connection state for 5caf6114-a574-4b1b-88bb-eb2e0393b3c9 connecting
jsxc.js:165 [JINGLE][log:info] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: Stream added
jsxc.js:165 [Webrtc] Remote stream for session 5caf6114-a574-4b1b-88bb-eb2e0393b3c9 added.
jsxc.js:165 [Webrtc] Use remote video device.
jsxc.js:165 [Webrtc] Use remote audio device.
jsxc.js:165 [JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: transport-info
jsxc.js:165 [JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: transport-info
jsxc.js:165 [JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: transport-info
jsxc.js:165 [JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: transport-info
jsxc.js:165 [JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: session-terminate
jsxc.js:165 [JINGLE][log:info] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: Terminating session
jsxc.js:165 [JINGLE][log:info] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: Stream removed
jsxc.js:165 [Webrtc] Remote stream for undefined removed.
jsxc.js:165 [JINGLE][log:info] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: Changing session state to: ended
jsxc.js:165 [Webrtc] call terminated 02712124383@10.67.125.28/1410928994565429567867906176450143812096607065317208331198failed-transport
jsxc.js:183 close dialog
jsxc.js:165 [JINGLE][log:info] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: Changing connection state to: disconnected
jsxc.js:165 connection state for 5caf6114-a574-4b1b-88bb-eb2e0393b3c9 disconnected
jsxc.js:165 [JINGLE][log:error] Unknown session
User2:
[JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: session-initiate
jsxc.js:165 [JINGLE][log:info] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: Initiating incoming session
jsxc.js:165 [JINGLE][log:info] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: Changing session state to: pending
jsxc.js:183 incoming call from 02633223354@10.67.125.28/30332216394602891171174904600673919011613765076971098719290
jsxc.js:165 [JINGLE][log:info] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: Ringing on incoming session
jsxc.js:165 [JINGLE][log:info] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: Stream added
jsxc.js:165 [Webrtc] Remote stream for session 5caf6114-a574-4b1b-88bb-eb2e0393b3c9 added.
jsxc.js:165 [Webrtc] Use remote video device.
jsxc.js:165 [Webrtc] Use remote audio device.
jsxc.js:165 [JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: transport-info
jsxc.js:165 [JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: transport-info
jsxc.js:165 [JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: transport-info
jsxc.js:165 [JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: transport-info
jsxc.js:165 [JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: transport-info
jsxc.js:165 [JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: transport-info
jsxc.js:165 [JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: transport-info
jsxc.js:165 [JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: transport-info
jsxc.js:165 [JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: transport-info
jsxc.js:165 [JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: transport-info
jsxc.js:165 [JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: transport-info
jsxc.js:165 [JINGLE][log:debug] 5caf6114-a574-4b1b-88bb-eb2e0393b3c9: transport-info
jsxc.js:183 onUserMediaSuccess
jsxc.js:165 [Webrtc] Accept call
XMPP
- /var/log/ejabberd/ejabberd.log:
2017-07-19 14:01:53.849 [info] <0.481.0>@ejabberd_listener:accept:333 (#Port<0.34007>) Accepted connection ::FFFF:10.67.125.6:38282 -> ::FFFF:10.67.125.28:5280
2017-07-19 14:01:53.850 [info] <0.24115.0>@ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.34007>,#Port<0.34008>}}
2017-07-19 14:01:54.040 [info] <0.481.0>@ejabberd_listener:accept:333 (#Port<0.34009>) Accepted connection ::FFFF:10.67.125.6:38288 -> ::FFFF:10.67.125.28:5280
2017-07-19 14:01:54.041 [info] <0.24116.0>@ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.34009>,#Port<0.34010>}}
2017-07-19 14:01:54.152 [info] <0.481.0>@ejabberd_listener:accept:333 (#Port<0.34011>) Accepted connection ::FFFF:10.67.125.6:38290 -> ::FFFF:10.67.125.28:5280
2017-07-19 14:01:54.153 [info] <0.24117.0>@ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.34011>,#Port<0.34012>}}
2017-07-19 14:01:54.326 [info] <0.481.0>@ejabberd_listener:accept:333 (#Port<0.34013>) Accepted connection ::FFFF:10.67.125.6:38296 -> ::FFFF:10.67.125.28:5280
2017-07-19 14:01:54.326 [info] <0.24118.0>@ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.34013>,#Port<0.34014>}}
2017-07-19 14:01:54.387 [info] <0.481.0>@ejabberd_listener:accept:333 (#Port<0.34015>) Accepted connection ::FFFF:10.67.125.6:38298 -> ::FFFF:10.67.125.28:5280
2017-07-19 14:01:54.387 [info] <0.24119.0>@ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.34015>,#Port<0.34016>}}
2017-07-19 14:01:54.528 [info] <0.481.0>@ejabberd_listener:accept:333 (#Port<0.34017>) Accepted connection ::FFFF:10.67.125.6:38300 -> ::FFFF:10.67.125.28:5280
2017-07-19 14:01:54.529 [info] <0.24120.0>@ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.34017>,#Port<0.34018>}}
2017-07-19 14:01:54.591 [info] <0.481.0>@ejabberd_listener:accept:333 (#Port<0.34019>) Accepted connection ::FFFF:10.67.125.6:38302 -> ::FFFF:10.67.125.28:5280
2017-07-19 14:01:54.591 [info] <0.24121.0>@ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.34019>,#Port<0.34020>}}
2017-07-19 14:01:58.512 [info] <0.481.0>@ejabberd_listener:accept:333 (#Port<0.34021>) Accepted connection ::FFFF:10.67.125.6:38340 -> ::FFFF:10.67.125.28:5280
2017-07-19 14:01:58.512 [info] <0.24122.0>@ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.34021>,#Port<0.34022>}}
2017-07-19 14:01:58.848 [info] <0.481.0>@ejabberd_listener:accept:333 (#Port<0.34023>) Accepted connection ::FFFF:10.67.125.6:38354 -> ::FFFF:10.67.125.28:5280
2017-07-19 14:01:58.848 [info] <0.24123.0>@ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.34023>,#Port<0.34024>}}
2017-07-19 14:01:58.911 [info] <0.481.0>@ejabberd_listener:accept:333 (#Port<0.34025>) Accepted connection ::FFFF:10.67.125.6:38360 -> ::FFFF:10.67.125.28:5280
2017-07-19 14:01:58.912 [info] <0.24124.0>@ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.34025>,#Port<0.34026>}}
2017-07-19 14:01:59.151 [info] <0.481.0>@ejabberd_listener:accept:333 (#Port<0.34027>) Accepted connection ::FFFF:10.67.125.6:38366 -> ::FFFF:10.67.125.28:5280
2017-07-19 14:01:59.152 [info] <0.24125.0>@ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.34027>,#Port<0.34028>}}
2017-07-19 14:01:59.307 [info] <0.481.0>@ejabberd_listener:accept:333 (#Port<0.34029>) Accepted connection ::FFFF:10.67.125.6:38376 -> ::FFFF:10.67.125.28:5280
2017-07-19 14:01:59.308 [info] <0.24126.0>@ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.34029>,#Port<0.34030>}}
2017-07-19 14:01:59.540 [info] <0.481.0>@ejabberd_listener:accept:333 (#Port<0.34031>) Accepted connection ::FFFF:10.67.125.6:38378 -> ::FFFF:10.67.125.28:5280
2017-07-19 14:01:59.541 [info] <0.24127.0>@ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.34031>,#Port<0.34032>}}
2017-07-19 14:02:13.855 [info] <0.481.0>@ejabberd_listener:accept:333 (#Port<0.34033>) Accepted connection ::FFFF:10.67.125.6:38612 -> ::FFFF:10.67.125.28:5280
2017-07-19 14:02:13.856 [info] <0.24130.0>@ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.34033>,#Port<0.34034>}}
2017-07-19 14:02:14.044 [info] <0.481.0>@ejabberd_listener:accept:333 (#Port<0.34035>) Accepted connection ::FFFF:10.67.125.6:38614 -> ::FFFF:10.67.125.28:5280
2017-07-19 14:02:14.045 [info] <0.24131.0>@ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.34035>,#Port<0.34036>}}
2017-07-19 14:02:14.205 [info] <0.481.0>@ejabberd_listener:accept:333 (#Port<0.34037>) Accepted connection ::FFFF:10.67.125.6:38620 -> ::FFFF:10.67.125.28:5280
2017-07-19 14:02:14.206 [info] <0.24132.0>@ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.34037>,#Port<0.34038>}}
2017-07-19 14:02:14.271 [info] <0.481.0>@ejabberd_listener:accept:333 (#Port<0.34039>) Accepted connection ::FFFF:10.67.125.6:38626 -> ::FFFF:10.67.125.28:5280
2017-07-19 14:02:14.272 [info] <0.24133.0>@ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.34039>,#Port<0.34040>}}
2017-07-19 14:02:14.357 [info] <0.481.0>@ejabberd_listener:accept:333 (#Port<0.34041>) Accepted connection ::FFFF:10.67.125.6:38628 -> ::FFFF:10.67.125.28:5280
2017-07-19 14:02:14.358 [info] <0.24134.0>@ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.34041>,#Port<0.34042>}}
2017-07-19 14:02:14.822 [info] <0.24102.0>@ejabberd_http_bind:handle_info:507 Session timeout. Closing the HTTP bind session: <<"e25a7dd94eeec1eb0928b3a6c648742ca96a5e55">>
2017-07-19 14:02:14.948 [info] <0.24105.0>@ejabberd_http_bind:handle_info:507 Session timeout. Closing the HTTP bind session: <<"bf11a3722026eb4e056799cc84c476b1ad3bf0eb">>
Host
Nothing
Issue Analytics
- State:
- Created 6 years ago
- Comments:20 (7 by maintainers)
Top Results From Across the Web
[discuss-webrtc] PeerConnection requiring TURN doesn't work
I've been trying for the last couple of days to get the example at apprtc.appspot.com to work via a TURN server. My setup...
Read more >Troubleshooting TURN - Giacomo Vacca
Troubleshooting points It's important to verify that the TURN settings are correctly configured; in Chrome, open Developer Tools and check in ...
Read more >RTCPeerConnection.setConfiguration() - Web APIs | MDN
setConfiguration() method sets the current configuration of the RTCPeerConnection based on the values included in the specified object. This ...
Read more >WebRTC RTCPeerConnection not established - Stack Overflow
So configuring TURN server might resolve your problem. To verify that this is the case you can try setup a call when both...
Read more >Configuring and using TURN | WebRTC Cookbook
In some cases, when clients use NAT and firewalls, it is impossible to establish a peer connection using STUN. This situation often appears...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @sualko, i fixed the problem: https://github.com/coturn/coturn/issues/162
Here is a good resource to get a basic understanding of WebRTC NAT traversal: https://www.html5rocks.com/en/tutorials/webrtc/infrastructure/#after-signaling-using-ice-to-cope-with-nats-and-firewalls
I think turn uses TCP/UDP port 3478.