Project 'savoirfairelinux/ring-daemon' was moved to 'savoirfairelinux/jami-daemon'. Please update any links and bookmarks that may still have the old path.
Call device A (network 1) after ~30secs tcp closed + call OK
NOTE: network 1 must be accessible only via TURN, it's important (A<->TURN<->B)
A decline call
A change to network 0
Call device A
Expected result
On TCP timeout the call should come
Current result
Stay connecting...
Observation
Coturn doesn't seems to detect half open connections. In fact, the bug here is that our keep alive are sent every 30 secs, but... A->TURN is opened ; TURN->B is closed. And the keep alive / packets will be ok during 5 minutes (the allocation time) before TURN to actually drop the connection
Edited
Designs
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related or that one is blocking others.
Learn more.
I agree that proper handling of the timeounts is important, e.g. to prevent problems with some edge cases or bug spilling effects.
Though, for continuous conections, shouldn't the client watch or register for local network status changes and renew the connection as soon as the device connects to a(nother) network?
No, they only implement TURN RFCs and they should not add any keep alive as it's not a problem to have half open connections for the TURN (as it is its role).
Could the client A reset/close some turn session upon network change?
This can't work. That's the whole thing of the keep alive. sporadic network changes can occurs. The call MUST NOT be cut if it can continues. So if you have an internet shutdown, local calls must continues while calls will be cut via keep alive or broken pipe errors. Opening and negotiating sockets take time, so if it can be avoided it should
I'm not sure what is meant by permissions for 30secs.
The call MUST NOT be cut if it can continues.
I assumed switching network (and IP) makes it impossible to ever continue/reusing a TCP connection. And thus when the network interface changes, it would be most logical for the client that can notice that, to initiate to reset/re-establish all connections immediately. (Setting them up again right-away should always be faster than first waiting for a timeout of the stale connection.)
Of course, waiting for the timeouts is needed when there is a network congestion or interruption in the network between the clients, or clients<->proxy, when the clients don't see an IP change in their local network links. That allows to detect temporary interruptions and have a threshold before trying to re-establish.
Hm, I understood the description as talking about establishing calls (after declining/switching lan/wifi). For that, I guessed that re-establishing would also not delay more then having to wait for a timeout, if a connection has become stale.
I assumed switching network (and IP) makes it impossible to ever continue/reusing a TCP connection.
This can be false in a lot of cases. I can have a call in my company, enable a VPN the connection will stay alive cause the company's network is still accessible. On mobile, some android version keeps socket from previous network opened and usable. So I can start a call in 4g, move to wifi and have usable calls. The only way to detect that a socket is usable is to use it.
I think for those operating system versions that have made sockets persist over network and IP changes, it would then be an operating system issue.
Then the OS has to immediately probe the connections after an IP change (e.g. re-start keep-alive timer with short retry interval and timeout) to properly maintain or close the connection.
On all other platforms, I think it would still remain the applications' duty to register or watch for IP changes to quickly re-establish connections.
Now, in 17904, each connectivityChange() or each call will send a ping/pong on the multiplexed socket. If no response, the connection will be cut and call will be renegotiated.
TODO: connectivityChanged() ; do it if peer got daemon > 10.0.0