I have begun using Ice4j for my Android telephony project to replace a different solution.
There is one issue left which I would like to get some basic feedback: When a TURN server is part of the candidates then Ice4j creates an allocation. There is some code inside ice/harvest/TurnCandidateHarvest close() method that sends a stay alive with 0 to effectively terminate the session when it is no longer needed.
It appears to me that this is only invoked when the socket is the TURN server itself and when it was selected for transport. I installed my own TURN server in order to see if any termination requests come in, and the TURN session stays open. Because I create a new Agent on every outgoing and incoming call, the TURN server is unavailable until it times out by itself.
How would I be able to send a stay alive 0 request to the TURN server with the same credentials used to create the allocation every time it was part of the candidates but not selected for transport in order to be guaranteed a working reconnection on subsequent calls?