i.e., it might make sense to have a configurable max number of tcp connections and then start closing them based on longest inactivity when the limit is exceeded.
Makes sense to me also.
If I understand the NAT problem, NAT devices may also close inactive TCP sessions. This is weird, but it obviously happens. This might be solved by the "NAT ping" stuff in module NAThelper being changed to send a SIP options request on an open TCP session with regular interval.
/O