0

Can you tell me what my error is? I'm trying to make WebRTC natively on android, but have no luck.

Android -> Android -- not working
Web -> Web -- working
Android -> Web -- working
Web - Android -- NOT working

So, my system works when Android initiates the call and browser answers, but not in reverse.

Here is the log of phone which initiates the call between two android phones:

2023-02-23 20:09:46.417 10428-10497/com.example.sandbox D/MainActivity$client: WsMessage(type=connection, data=WsMessageData(rtcMessage=null, caller=null))
2023-02-23 20:09:57.524 10428-10428/com.example.sandbox D/MainActivity: Call and create offer
2023-02-23 20:09:57.558 10428-10463/com.example.sandbox D/MainActivity$sdpObserverLocal: descriptionCreated
2023-02-23 20:09:57.579 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: signalling changeLocal HAVE_LOCAL_OFFER
2023-02-23 20:09:57.629 10428-10463/com.example.sandbox D/SdbObserverSingle: OnSetSuccess 1
2023-02-23 20:09:57.629 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: OnIceGatheringChange GATHERING
2023-02-23 20:09:57.682 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: OnIce
2023-02-23 20:09:57.683 10428-10463/com.example.sandbox D/WebSocketClient: make ice: {"type":"ICEcandidate","data":{"user":"1234","rtcMessage":{"id":"video","label":0,"candidate":"candidate:3362660723 1 udp 2122260223 192.168.232.2 35641 typ host generation 0 ufrag 3iG5 network-id 5 network-cost 10"}}}
2023-02-23 20:09:57.683 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: OnIce
2023-02-23 20:09:57.684 10428-10463/com.example.sandbox D/WebSocketClient: make ice: {"type":"ICEcandidate","data":{"user":"1234","rtcMessage":{"id":"video","label":0,"candidate":"candidate:3043609203 1 udp 2122187263 fec0::15:b4ff:fe00:0 57459 typ host generation 0 ufrag 3iG5 network-id 6 network-cost 10"}}}
2023-02-23 20:09:57.688 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: OnIce
2023-02-23 20:09:57.689 10428-10463/com.example.sandbox D/WebSocketClient: make ice: {"type":"ICEcandidate","data":{"user":"1234","rtcMessage":{"id":"video","label":0,"candidate":"candidate:3362660723 1 udp 2122129151 192.168.232.2 58207 typ host generation 0 ufrag 3iG5 network-id 3 network-cost 900"}}}
2023-02-23 20:09:57.704 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: OnIce
2023-02-23 20:09:57.706 10428-10463/com.example.sandbox D/WebSocketClient: make ice: {"type":"ICEcandidate","data":{"user":"1234","rtcMessage":{"id":"video","label":0,"candidate":"candidate:3043609203 1 udp 2122056191 fec0::15:b4ff:fe00:0 40429 typ host generation 0 ufrag 3iG5 network-id 4 network-cost 900"}}}
2023-02-23 20:09:57.874 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: OnIce
2023-02-23 20:09:57.875 10428-10463/com.example.sandbox D/WebSocketClient: make ice: {"type":"ICEcandidate","data":{"user":"1234","rtcMessage":{"id":"video","label":0,"candidate":"candidate:842163049 1 udp 1686052607 77.234.205.3 49307 typ srflx raddr 192.168.232.2 rport 35641 generation 0 ufrag 3iG5 network-id 5 network-cost 10"}}}
2023-02-23 20:09:58.021 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: OnIce
2023-02-23 20:09:58.022 10428-10463/com.example.sandbox D/WebSocketClient: make ice: {"type":"ICEcandidate","data":{"user":"1234","rtcMessage":{"id":"video","label":0,"candidate":"candidate:842163049 1 udp 1685921535 77.234.205.3 53299 typ srflx raddr 192.168.232.2 rport 58207 generation 0 ufrag 3iG5 network-id 3 network-cost 900"}}}
2023-02-23 20:09:58.154 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: OnIce
2023-02-23 20:09:58.154 10428-10463/com.example.sandbox D/WebSocketClient: make ice: {"type":"ICEcandidate","data":{"user":"1234","rtcMessage":{"id":"video","label":0,"candidate":"candidate:3091107750 1 udp 41885695 216.39.253.11 36963 typ relay raddr 77.234.205.3 rport 49307 generation 0 ufrag 3iG5 network-id 5 network-cost 10"}}}
2023-02-23 20:09:58.156 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: OnIce
2023-02-23 20:09:58.156 10428-10463/com.example.sandbox D/WebSocketClient: make ice: {"type":"ICEcandidate","data":{"user":"1234","rtcMessage":{"id":"video","label":0,"candidate":"candidate:3091107750 1 udp 41885951 216.39.253.11 51397 typ relay raddr 77.234.205.3 rport 49307 generation 0 ufrag 3iG5 network-id 5 network-cost 10"}}}
2023-02-23 20:09:58.165 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: OnIce
2023-02-23 20:09:58.165 10428-10463/com.example.sandbox D/WebSocketClient: make ice: {"type":"ICEcandidate","data":{"user":"1234","rtcMessage":{"id":"video","label":0,"candidate":"candidate:3091107750 1 udp 41754879 216.39.253.11 30121 typ relay raddr 77.234.205.3 rport 53299 generation 0 ufrag 3iG5 network-id 3 network-cost 900"}}}
2023-02-23 20:09:58.234 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: OnIce
2023-02-23 20:09:58.234 10428-10463/com.example.sandbox D/WebSocketClient: make ice: {"type":"ICEcandidate","data":{"user":"1234","rtcMessage":{"id":"video","label":0,"candidate":"candidate:3091107750 1 udp 41754623 216.39.253.11 59254 typ relay raddr 77.234.205.3 rport 53299 generation 0 ufrag 3iG5 network-id 3 network-cost 900"}}}
2023-02-23 20:09:58.308 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: OnIce
2023-02-23 20:09:58.308 10428-10463/com.example.sandbox D/WebSocketClient: make ice: {"type":"ICEcandidate","data":{"user":"1234","rtcMessage":{"id":"video","label":0,"candidate":"candidate:4139610966 1 udp 24977151 216.39.253.11 40620 typ relay raddr 77.234.205.3 rport 52941 generation 0 ufrag 3iG5 network-id 3 network-cost 900"}}}
2023-02-23 20:09:58.309 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: OnIce
2023-02-23 20:09:58.309 10428-10463/com.example.sandbox D/WebSocketClient: make ice: {"type":"ICEcandidate","data":{"user":"1234","rtcMessage":{"id":"video","label":0,"candidate":"candidate:4139610966 1 udp 25108223 216.39.253.11 51889 typ relay raddr 77.234.205.3 rport 52942 generation 0 ufrag 3iG5 network-id 5 network-cost 10"}}}
2023-02-23 20:09:58.309 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: OnIceGatheringChange COMPLETE
2023-02-23 20:10:03.219 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: signalling changeLocal STABLE
2023-02-23 20:10:03.226 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: OnIceStateChanged CHECKING
2023-02-23 20:10:03.228 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: onAddTrack
2023-02-23 20:10:03.229 10428-10463/com.example.sandbox D/MainActivity$localPeerConnection: add sink
2023-02-23 20:10:03.229 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: gotStream
2023-02-23 20:10:03.229 10428-10463/com.example.sandbox D/MainActivity$localPeerConnection: add sink
2023-02-23 20:10:03.229 10428-10463/com.example.sandbox D/SdbObserverSingle: OnSetSuccess 4
2023-02-23 20:10:03.230 10428-10497/com.example.sandbox D/MainActivity$client: Recieve  branch 3
2023-02-23 20:10:03.230 10428-10497/com.example.sandbox D/MainActivity$client: WsMessage(type=call_answered, data=WsMessageData(rtcMessage=RtcMessage(sdp=v=0
    o=- 1260262642895022170 2 IN IP4 127.0.0.1
    s=-
    t=0 0
    a=group:BUNDLE video
    a=msid-semantic: WMS 79bacf84-c7f1-402c-8624-a7b669054f69
    m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127
    c=IN IP4 0.0.0.0
    a=rtcp:9 IN IP4 0.0.0.0
    a=ice-ufrag:CbK6
    a=ice-pwd:CHOYp1w8s5xMgiteGlPt+pZp
    a=ice-options:trickle renomination
    a=fingerprint:sha-256 66:B8:44:4A:B2:2C:69:E4:B6:D5:2D:C9:2F:E2:BE:8F:FC:E9:ED:7B:5E:8B:E7:86:53:FF:4B:16:E6:A4:C0:76
    a=setup:active
    a=mid:video
    a=extmap:1 urn:ietf:params:rtp-hdrext:toffset
    a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
    a=extmap:3 urn:3gpp:video-orientation
    a=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
    a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
    a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
    a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
    a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space
    a=sendrecv
    a=rtcp-mux
    a=rtcp-rsize
    a=rtpmap:96 VP8/90000
    a=rtcp-fb:96 goog-remb
    a=rtcp-fb:96 transport-cc
    a=rtcp-fb:96 ccm fir
    a=rtcp-fb:96 nack
    a=rtcp-fb:96 nack pli
    a=rtpmap:97 rtx/90000
    a=fmtp:97 apt=96
    a=rtpmap:98 VP9/90000
    a=rtcp-fb:98 goog-remb
    a=rtcp-fb:98 transport-cc
    a=rtcp-fb:98 ccm fir
    a=rtcp-fb:98 nack
    a=rtcp-fb:98 nack pli
    a=rtpmap:99 rtx/90000
    a=fmtp:99 apt=98
    a=rtpmap:100 red/90000
    a=rtpmap:101 rtx/90000
    a=fmtp:101 apt=100
    a=rtpmap:127 ulpfec/90000
    a=ssrc-group:FID 841761704 777482852
    a=ssrc:841761704 cname:d+7jztla//Bfh+2L
    a=ssrc:841761704 msid:79bacf84-c7f1-402c-8624-a7b669054f69 ARDAMSv0
    a=ssrc:841761704 mslabel:79bacf84-c7f1-402c-8624-a7b669054f69
    a=ssrc:841761704 label:ARDAMSv0
    a=ssrc:777482852 cname:d+7jztla//Bfh+2L
    a=ssrc:777482852 msid:79bacf84-c7f1-402c-8624-a7b669054f69 ARDAMSv0
    a=ssrc:777482852 mslabel:79bacf84-c7f1-402c-8624-a7b669054f69
    a=ssrc:777482852 label:ARDAMSv0
    , type=answer, id=null, label=null, candidate=null), caller=null))
2023-02-23 20:10:03.235 10428-10497/com.example.sandbox D/MainActivity$client: Recieve  branch 3
2023-02-23 20:10:03.235 10428-10497/com.example.sandbox D/MainActivity$client: WsMessage(type=ICEcandidate, data=WsMessageData(rtcMessage=RtcMessage(sdp=null, type=null, id=video, label=0, candidate=candidate:3025050341 1 udp 2122260223 192.168.200.2 53603 typ host generation 0 ufrag CbK6 network-id 3 network-cost 900), caller=null))
2023-02-23 20:10:03.236 10428-10497/com.example.sandbox D/MainActivity$client: Recieve  branch 3
2023-02-23 20:10:03.237 10428-10497/com.example.sandbox D/MainActivity$client: WsMessage(type=ICEcandidate, data=WsMessageData(rtcMessage=RtcMessage(sdp=null, type=null, id=video, label=0, candidate=candidate:3027075093 1 udp 2122187263 fec0::702c:c9ff:fe8a:579a 60618 typ host generation 0 ufrag CbK6 network-id 4 network-cost 900), caller=null))
2023-02-23 20:10:03.333 10428-10497/com.example.sandbox D/MainActivity$client: Recieve  branch 3
2023-02-23 20:10:03.333 10428-10497/com.example.sandbox D/MainActivity$client: WsMessage(type=ICEcandidate, data=WsMessageData(rtcMessage=RtcMessage(sdp=null, type=null, id=video, label=0, candidate=candidate:842163049 1 udp 1686052607 77.234.205.3 50069 typ srflx raddr 192.168.200.2 rport 53603 generation 0 ufrag CbK6 network-id 3 network-cost 900), caller=null))
2023-02-23 20:10:03.551 10428-10497/com.example.sandbox D/MainActivity$client: Recieve  branch 3
2023-02-23 20:10:03.551 10428-10497/com.example.sandbox D/MainActivity$client: WsMessage(type=ICEcandidate, data=WsMessageData(rtcMessage=RtcMessage(sdp=null, type=null, id=video, label=0, candidate=candidate:3091107750 1 udp 41885951 216.39.253.11 46601 typ relay raddr 77.234.205.3 rport 50069 generation 0 ufrag CbK6 network-id 3 network-cost 900), caller=null))
2023-02-23 20:10:03.554 10428-10497/com.example.sandbox D/MainActivity$client: Recieve  branch 3
2023-02-23 20:10:03.554 10428-10497/com.example.sandbox D/MainActivity$client: WsMessage(type=ICEcandidate, data=WsMessageData(rtcMessage=RtcMessage(sdp=null, type=null, id=video, label=0, candidate=candidate:3091107750 1 udp 41885695 216.39.253.11 37724 typ relay raddr 77.234.205.3 rport 50069 generation 0 ufrag CbK6 network-id 3 network-cost 900), caller=null))
2023-02-23 20:10:03.784 10428-10497/com.example.sandbox D/MainActivity$client: Recieve  branch 3
2023-02-23 20:10:03.785 10428-10497/com.example.sandbox D/MainActivity$client: WsMessage(type=ICEcandidate, data=WsMessageData(rtcMessage=RtcMessage(sdp=null, type=null, id=video, label=0, candidate=candidate:4139610966 1 udp 25108223 216.39.253.11 40876 typ relay raddr 77.234.205.3 rport 52945 generation 0 ufrag CbK6 network-id 3 network-cost 900), caller=null))
2023-02-23 20:10:20.244 10428-10463/com.example.sandbox D/Aux$buildPeerConnectionLocal: OnIceStateChanged FAILED

Please check that the last thing shows that status change was failed. On the receiver side status change was completed. I can paste the log from the receiver side if you need this. Thank you!

nutella_eater
  • 3,393
  • 3
  • 27
  • 46

0 Answers0