[OpenSIPS-Users] Best practice for nat_keepalive

Thomas Gelf thomas at gelf.net
Fri May 29 16:09:13 CEST 2009


I would like to share some thoughts/questions regarding nat_keepalive()
from the nat_traversal module. First thing I'm wondering whether I
should send keepalives only to clients with NAT issues (as reported by
client_nat_test) or to all of them (even clients without obvious NAT
issues).

The former would save ressources, the latter would make sure that
clients using STUN behind a non-symmetric NAT router would remain
reacheable even if their own keepalive mechanism is not configured
or implemented correctly.

What I'm evaluationg to do is running nat_keepalive for each REGISTER
and for each initial INVITE request, regardless of how they present
themselves - but respecting a setting in usr_preferences, allowing me
to switch keep_alives off per user. I would also put such a switch in
their web-backend.

Next thing I was reflecting about is the keepalive_interval. I would
like to set something like 57 seconds, as I've seen routers/firewalls
closing ports after 60 seconds. Sure, in case one single keepalive is
lost the port is lost - but hey, who cares ;-p I'm fine with 57 seconds
as a pragmatic approach, but I'm really interested in your opinions!

Best regards,
Thomas Gelf




More information about the Users mailing list