turn: improve connectivity with unreachable TURN
Initializing a ICE session will need to gather candidates. The TURN can be long to retrieve, and fails can be really long to detect. There is at least 3 cases of failures: + IPv6 badly configured, which can cause a DNS resolution timeout of several minutes (that's why the IP was cached) + Empty DNS entries, causing a resolution failure + A TURN server un-reachable or wrongly configured (e.g. 1.1.1.1) The idea here is to resolve the TURN and test the connection before caching it. And use it when cached. This avoid all resolutions steps and we're basically sure that it was working. Other approaches: + Add a new callback in pjsip to detect that the TURN is taking too long to remove it for next calls, but I prefer to not add another patch in pj and it's not an ideal solution + trickle ICE to not wait for all candidates, but this is a big changes and will generate more DHT messages + Do not retransmit messages, but this is against the RFC Change-Id: I2bbc8d9ae76a9e3124c71343df02e2ed077b938d GitLab: #781
Showing
- src/connectivity/Makefile.am 4 additions, 0 deletionssrc/connectivity/Makefile.am
- src/connectivity/peer_connection.h 0 additions, 3 deletionssrc/connectivity/peer_connection.h
- src/connectivity/turn_cache.cpp 196 additions, 0 deletionssrc/connectivity/turn_cache.cpp
- src/connectivity/turn_cache.h 88 additions, 0 deletionssrc/connectivity/turn_cache.h
- src/connectivity/turn_transport.cpp 183 additions, 0 deletionssrc/connectivity/turn_transport.cpp
- src/connectivity/turn_transport.h 59 additions, 0 deletionssrc/connectivity/turn_transport.h
- src/jamidht/jamiaccount.cpp 15 additions, 114 deletionssrc/jamidht/jamiaccount.cpp
- src/jamidht/jamiaccount.h 8 additions, 1 deletionsrc/jamidht/jamiaccount.h
- src/meson.build 2 additions, 0 deletionssrc/meson.build
- src/sip/sipaccountbase.cpp 18 additions, 14 deletionssrc/sip/sipaccountbase.cpp
- src/sip/sipaccountbase.h 4 additions, 19 deletionssrc/sip/sipaccountbase.h
- test/unitTest/call/call.cpp 66 additions, 21 deletionstest/unitTest/call/call.cpp
Loading
Please register or sign in to comment