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

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1344
_______________________________________________
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to