Hello!
I'm trying to stream the screen from Android (google-webrtc version 1.0.20284) to a web client (Chrome).
When both are on WiFi, everything works perfectly and I can view the stream correctly on the web client.
To test my Coturn server, I turn off the WiFi on my Android device to force it to use the
TURN server. When I do that, the streaming never works. While debugging on my
phone I noticed this on Logcat:
I (port.cc:1234): Jingle:Conn[0x73b0a51400:audio:1qypz49L:1:0:relay:udp:52.37.121.x:63681->lUGtf7lO:1:33562623:relay:udp:52.37.121.x:59783|C--I|0|0|107838996712800255|-]: Timed out a
fter 15011 ms without a response, rtt=6000
I (port.cc:1457): Jingle:Conn[0x73b0a51400:audio:1qypz49L:1:0:relay:udp:52.37.121.x:63681->lUGtf7lO:1:33562623:relay:udp:52.37.121.x:59783|C-xI|0|0|107838996712800255|-]: Sent STUN p
ing, id=314c70427148796f42496c36, use_candidate=0, nomination=0
I (p2ptransportchannel.cc:1472): Jingle:Channel[audio|1|__]: Transport channel state changed from 2 to 3
I (transportcontroller.cc:824): audio TransportChannel 1 state changed. Check if state is complete.
I (port.cc:1503): Connection deleted with number of pings sent: 51
I (webrtcsession.cc:1464): Changing IceConnectionState 1 => 4
I (p2ptransportchannel.cc:1890): Jingle:Channel[audio|1|__]: Removed connection 0x73b0a51400 (0 remaining)
PCRTCClient D IceConnectionState: FAILED
E Peerconnection error: ICE connection failed.
ConnectionEvents E ICE connection failed.
I'm using the default Coturn settings:
turn:X.X.X.X:3478?transport=udp (IPv4)
turn:[X:X:X:X:X]:3478?transport=udp (IPv6)
I can see logs for the incoming connections on the Coturn server, here is a snippet from /var/log/messages:
Nov 4 21:54:17 ip-172-31-37-45 turnserver: 2816: session 000000000000000013: realm <north.gov> user <>: incoming packet BINDING processed, success Nov 4 21:54:23 ip-172-31-37-45 turnserver: 2823: session 001000000000000006: realm <north.gov> user <ninefingers>: incoming packet BINDING processed, success Nov 4 21:54:27 ip-172-31-37-45 turnserver: 2827: session 000000000000000013: realm <north.gov> user <>: incoming packet BINDING processed, success Nov 4 21:54:33 ip-172-31-37-45 turnserver: 2833: session 001000000000000006: realm <north.gov> user <ninefingers>: incoming packet BINDING processed, success Nov 4 21:54:36 ip-172-31-37-45 turnserver: 2836: session 000000000000000013: closed (2nd stage), user <> realm <north.gov> origin <>, local [2600:1f14:5cc:aa00:eee4:8f69:72ef:5d9c]:3478, remote [2607:fb90:8060:de14:a49f:2a47:bc32:7d53]:37413, reason: allocation watchdog determined stale session state Nov 4 21:54:37 ip-172-31-37-45 turnserver: 2837: handle_udp_packet: New UDP endpoint: local addr [2600:1f14:5cc:aa00:eee4:8f69:72ef:5d9c]:3478, remote addr [2607:fb90:8060:de14:a49f:2a47:bc32:7d53]:37413
Nov 4 21:54:37 ip-172-31-37-45 turnserver: 2837: session 000000000000000014: realm <north.gov> user <>: incoming packet BINDING processed, success Nov 4 21:54:43 ip-172-31-37-45 turnserver: 2843: session 001000000000000006: realm <north.gov> user <ninefingers>: incoming packet BINDING processed, success
Interestingly, when I use the AppRTC TURN server, I can correctly stream it, so that means something must be wrong with my Coturn configuration.
I'm using the default settings with the Amazon AMI (ami-908316f0) and just set the external-ip in the turnserver.conf file.
Anything else I'm missing? Any ideas?
Thanks in advance!
Felipe