My experiments show that with ``` modparam("nathelper", "ping_nated_only", 1) modparam("nathelper", "sipping_bflag", FLB_NATSIPPING) modparam("usrloc", "nat_bflag", FLB_NATB) ``` when both FLB_NATB and FLB_NATSIPPING branch flags are set, no OPTIONS from Kamailio to UAC is generated, so I assume that nathelper.ping_nated_only=1 does force 4-bytes UDP keepalive.
This change spells the above, as the behaviour currently is not specified. You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3346
-- Commit Summary --
* nathelper: ping_nated_only sends 4-bytes UDP-packet pings
-- File Changes --
M src/modules/nathelper/doc/nathelper_admin.xml (12) M src/modules/nathelper/examples/4to6.cfg (2) M src/modules/nathelper/examples/alg.cfg (2) M src/modules/nathelper/nathelper.c (6) M src/modules/nathelper/nhelpr_funcs.c (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3346.patch https://github.com/kamailio/kamailio/pull/3346.diff
Regarding the uac nat ping method, I think its documented here: https://kamailio.org/docs/modules/5.5.x/modules/nathelper.html#nathelper.p.p...
@dilyanpalauzov pushed 1 commit.
d1ac6d99f34775e2f95e725a4de015824f3e9c20 nathelper: ping_nated_only sends 4-bytes UDP-packet pings
The documentation says for nathelper.ping_nated_only=1 that only contacts that have the behind NAT “nat_bflag” flag in user location database set will get ping.
The current wording does not specify, if the latter ping is 4-byted UPD-packet ping, or SIP-request-based ping.
Yesterday when I submitted the change I was behing SIP ALG. Today, without SIP ALG, testing again, I came to the opposite conclusion compared to yesterday:
nathelper.ping_nated_only=1 does send SIP-request-based pings. It does not send 4-byte UDP-packet pings.
To be precise, the current wording:
If this parameter is set to 1 then only contacts that have the behind NAT “nat_bflag” flag in user location database set will get ping.
If it is 0 and sipping_bflag is not set, then the 4-bytes UDP ping is sent to all contacts. If it is 0 and sipping_bflag parameter is set, then SIP-request-based pinging is sent to all contacts.
for me implies, that sipping_bflag is relevant when ping_nated_only=1, and irrelevant when ping_nated_only=0.
for me implies, that sipping_bflag is relevant when ping_nated_only=1, and irrelevant when ping_nated_only=0.
READ:
for me implies, that sipping_bflag is relevant when ping_nated_only=0, and irrelevant when ping_nated_only=1.
Merging because of the typos, then I will try to adjust the section for pinging.
Merged #3346 into master.
Updated docs, it is supposed to send OPTIONS requests when `nat_bflag`+`sipping_bflag` branch flags are both set for the case when `ping_nated_only=1`.