Open xelven opened 8 years ago
There should be an API to listen for ICE events (and other errors), but it hasn't been implemented yet. @superdump @pererikb what would be the best way to expose these signals up to the Objective-C API?
@stefanalund thank u for your replay, I just found there have double 1. anyway I think I found way out for my second question "the ICE State call back", I made the code to add "component-state-changed" listener from "transport_agent->priv", now is works for me.
But for the first question I still need to take look, I think is wired. please lets discuss on it.
Can that be made in to a generic solution that can be exposed up to the Objective C API? Would be great with a ICEConnectionStateListener protocol or similar.
@stefanalund I think we should figure out what's wrong on ICE candidate relay or on TURN server first, let this lib more robust such as this issue it's should not be happened all the time, then thinking about more details or api will better, what do your think.
there is really wired thing happened,
here is 2 candidate paired, seems everything is ok. my iOS device connect Wi-Fi ip is 192.168.1.187 as CANDIDATE_TYPE_HOST are fine. But the other iOS device connect 4G in other county, the ip address seems 192.168.1.101, and then we paired with them 192.168.1.254, type are CANDIDATE_TYPE_PEER_REFLEXIVE ???
and then my device thinking has been connected start send source to Agent 0x16237000 : s1:1: sending 1 messages to [192.168.1.254]:58831
and they will never connected.
(<unknown>:251): libnice-CRITICAL **: file address.c: line 196 (nice_address_get_port): should not be reached
nice_remote_candidate No.1 NiceCandidateType: CANDIDATE_TYPE_HOST,NiceCandidateTransport: TRANSPORT_TYPE_UDP,addr: 192.168.1.101,port:51992, base_addr: H,base_port: 0,priority: 2013266431, stream_id: 1, component_id: 1,username: (null),password:(null),
NO TURN
nice_remote_candidate No.2 NiceCandidateType: CANDIDATE_TYPE_PEER_REFLEXIVE,NiceCandidateTransport: TRANSPORT_TYPE_UDP,addr: 192.168.1.254,port:57972, base_addr: 192.168.1.254,base_port: 57972,priority: 1853824767, stream_id: 1, component_id: 1,username: (null),password:(null),
NO TURN
nice_remote_candidate No.3 NiceCandidateType: CANDIDATE_TYPE_PEER_REFLEXIVE,NiceCandidateTransport: TRANSPORT_TYPE_TCP_ACTIVE,addr: 192.168.1.254,port:58831, base_addr: 192.168.1.254,base_port: 58831,priority: 1853824767, stream_id: 1, component_id: 1,username: (null),password:(null),
NO TURN
local_candidate No.1 candidate_type: CANDIDATE_TYPE_HOST,component_type: COMPONENT_TYPE_RTP,foundation: 1,transport_type: TRANSPORT_TYPE_UDP,address: 192.168.1.101, port: 51992, priority: 2013266431,related_address: ,related_port:0
the --- session 1 --- component_id 1 state is: connecting
2016-03-04 18:09:57.874 TestWebRTC[251:10257] in calling status changed text = connecting...
2016-03-04 18:09:57.883 TestWebRTC[251:10319] local_min_port = 40000, local_max_port = 65535
---
2016-03-04 18:09:57.889 TestWebRTC[251:10319] --------------on_new_selected_pair1---------------------
pair Local_Candidate No.0 NiceCandidateType: CANDIDATE_TYPE_HOST,NiceCandidateTransport: TRANSPORT_TYPE_TCP_PASSIVE,addr: 192.168.1.187,port: 55570,base_addr: 192.168.1.187,base_port: 55570,priority: 1015022079, stream_id: 1, component_id: 1,username: (null),password:(null),
NO TURN
pair Remote_Candidate No.0 NiceCandidateType: CANDIDATE_TYPE_PEER_REFLEXIVE,NiceCandidateTransport: TRANSPORT_TYPE_TCP_ACTIVE,addr: 192.168.1.254,port:58831, base_addr: 192.168.1.254,base_port: 58831, priority: 1853824767, stream_id: 1, component_id: 1,username: (null),password:(null),
NO TURN
2016-03-04 18:09:57.889 TestWebRTC[251:10319] -----------------------------------
@alessandrod is looking in to this.
I also got the same problem. My two Android devices in the different networks got ICE failure when they try to build video connection.
owr_session.c:555:_owr_session_emit_ice_state_changed: Session 1, ICE failed to establish a connection! ICE state changed from disconnected to failed
Any advice?
Hi guys, I got 2 question for the current ICE candidate flow design and the lib used.
First it is wired issue, when the network are same LAN or mobile network are fine, because there connect direct, but on difference network they will relay. But is so wired when I generated Offer the 192.168.18.138 is my ip in LAN, and 116.226.127.167 is my public IP, and the 54.178.56.14 relay to IP in LAN 192.168.18.138?
the second question is at same environment 80% will got
or
is there any call back let me notify to UI, cause the current UX are petty bad, when the state failed, rtc never connect or reconnect, the UI just hold on the Connecting always.