NAThelper SIP message/OPTIONS ping functionality

Keywords: 0.9.x | nathelper

0.9.7-pre4 (probably all 0.9.x)

NAThelper patch from Portaone that enables the ping functionality in nathelper to send SIP message (i.e. OPTIONS) instead of 4-byte UDP packets. This is useful for NATs that ignore ping keepalives from the outside as the user agent will answer the OPTIONS packet with OK (or 404 Not found etc dependent on support for OPTIONS).


Save the patchfile to modules/nathelper directory, then (having that directory as current) use the command 'patch -p1 < nathelper_ping.patch'

OBS! You also need to edit the parser/parse_hostport.c file and remove the #ifdef _OBSOLETED and #endif around the parse_hostport() function.

Add this to your seri.cfg to enable OPTIONS messages to the UAs as keepalives:
modparam("nathelper", "natping_method", "OPTIONS")

You will see a lot 'No UACi support' warning messages in your log. These are harmless and are caused by replies to the OPTIONS message and SERi detects (correctly) these messages as originated from SER (as UAC). You can remove the warnings by commenting out in modules/tm/t_reply.c in run_failure_handler():

        /* failure_route for a local UAC? */
        if (!shmem_msg) {
          /* GVT: Commented out as nathelper sends UAC messages to UAs for keepalives. The replies
             should just be ignored... */
          /* LOG(L_WARN,"Warning: run_failure_handlers: no UAC support (%d, %d) \n",
                                        t->on_negative, t->tmcb_hl.reg_types); */
          return 0;
        }

AttachmentSize
nathelper_ping.patch13.42 KB
Home |  Recent changes |  Search |  Glossary |  Sitemap |  Login