usrloc has this var:
3.1. nat_bflag (integer)
The index of the branch flag to be used as NAT marker (if the contact
is or not natted). This is a branch flag and it will be imported and
used by all other modules depending of usrloc module.
it is a fine flag telling that a particular contact is behind nat, but
it does not tell if that particular contact should be nat pinged.
nathelper has this var:
4.3. ping_nated_only (integer)
If this variable is set then only contacts that have "behind_NAT" flag
in user location database set will get ping.
that is not a good var, because not contacts that are behind nat
(e.g. ones that use tcp or outbound) need to be pinged.
now in master a new nathelper var was introduced (i guess for solving
the above problem):
4.10. natping_disable_bflag (integer)
What branch flag should be used by the module to disable NAT pings on a
per-registration basis. If the given flag is set for a particular
registration, then no NAT pings will be sent at all, regardless of any
other conditions.
i my opinion this solution is not good, because it complicates the
decision process by requiring that two flags need to be checked in order
to determine if a contact should be nat pinged.
i would have liked to solve this problem by introducing a new nathelper
var "nat ping this contact bflag" that tells which bflag to check when
deciding if a contact should be nat pinged. that bflag would then be
set before registrar save() is called in addition to setting the "behind
nat" bflag.
in my opinion there should have been discussion on this list before the
natping_disable_bflag was introduced.
also, for the benefit of db only usrloc, i would like to add a new "nat
ping" column to location table, which tells if the contact should be nat
pinged and if so how the pinging should be done.
comments or should i just go ahead with the plan?
-- juha