when using the below script blocks for handling SUBSCRIBE messages, the nat_keepalive does not work as expected. ``` #!ifdef NAT_TRAVERSAL_ROLE route[PRESENCE_NAT] { force_rport(); if (client_nat_test("3")) { if(is_first_hop()) set_contact_alias(); nat_keepalive(); } } #!endif
route[HANDLE_SUBSCRIBE] { if (!is_method("SUBSCRIBE")) { return; }
#!ifdef NAT_TRAVERSAL_ROLE route(PRESENCE_NAT); #!endif
if (!t_newtran()) { sl_reply_error(); exit; }
if(has_totag()) { route(HANDLE_RESUBSCRIBE); } else { route(HANDLE_NEW_SUBSCRIBE); } t_release(); exit; } ```
i believe this should be backported to stable branches Thanks You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1344
-- Commit Summary --
* nat_traversal: fix local generated transactions
-- File Changes --
M src/modules/nat_traversal/nat_traversal.c (29)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1344.patch https://github.com/kamailio/kamailio/pull/1344.diff