I am looking at determining if a media connection done via ice4j uses a relay and which type of relay is used.
For the moment, I see 4 categories of relay:
- NULL, no relay used.
- STUN_SERVER, the relay is a STUN server.
- TURN_SERVER, the relay is a TURN server.
- JINGLE_NODE, the relay is a Jingle node.
I want to store this information into the local candidates harvested by ice4j. Thus, this may be determined by the candidate type or the harvester used. The following assumptions derive from code analysis, thereby help and corrections from ICE "connoisseur" are welcome:
- HostCandidate never uses a relay.
- UPNPCandidate never uses a relay.
- RelayedCandidate always uses a TURN_SERVER.
- GoogleRelayedCandidate always uses a TURN_SERVER.
- PeerReflexiveCandidate always uses STUN_SERVER.
- ServerReflexiveCandidate always uses a STUN_SERVER as it is only created by the StunCandidateHarvest or by its subclass(TurnCandidateHarvest and GoogleCandidateHarvest), but always determined by a STUN response.
- Outside of ice4j (but part of Jitsi) JingleNodesCandidate always uses JINGLE_NODE.
If the above explanation seems too obfuscated or too sparse, the correlated patches are joined to this email.
jitsiCandidateRelayType.patch (913 Bytes)
ice4jCandidateRelayType.patch (8.95 KB)