[OpenSIPS-Users] Nathelper module doesn't send OPTIONS keepalive

Julian Santer julian.santer at rolmail.net
Mon May 2 12:50:55 CEST 2016


Hi guys,

my mistake was to configure the nathelper module on edge server.
As it has to use the usrloc module and the usrloc module is on the core server.

So I have loaded now the nathelper module on the core server:

loadmodule "usrloc.so"
modparam("usrloc", "user_column",           "username")
...

loadmodule "nathelper.so"
modparam("nathelper", "natping_interval", 10)
modparam("nathelper", "ping_nated_only", 0)
modparam("nathelper", "natping_partitions", 1)
modparam("nathelper", "sipping_bflag", 8)
modparam("nathelper", "sipping_from", "sip:keepalive at lab.rolvoice.it")
modparam("nathelper", "sipping_method", "OPTIONS")

route[R_REGISTER]
{
     if (! save("LOCATION_TABLE", "vp1"))
     {
         xlog("L_ERR", "Saving contact from EDGE failed - LF_BASE");
         exit;
     }
     xlog("L_INFO", "Saving contact received from EDGE, replicate to REGISTRAR_FAILOVER - LF_BASE");

     if (proto == UDP)
     {
         setbflag(8);
         xlog("L_INFO", "Nat keepalive sip_ping_flag - LF_BASE");
     }

In log I see:
May  2 12:42:59 core2 OpenSIPS[34111]: Saving contact received from EDGE - M=REGISTER RURI=sip:1.2.3.5 F=sip:dev-lab1 at domain T=sip:dev-lab1 at domain 
SRC=1.2.3.4:5060 UAC=snom760/8.7.5.35 ID=3134363034303936373734333636-kohhuu6fsruo B=<null>
May  2 12:42:59 core2 OpenSIPS[34111]: Nat keepalive sip_ping_flag - M=REGISTER RURI=sip:1.2.3.5 F=sip:dev-lab1 at domain T=sip:dev-lab1 at domain 
SRC=1.2.3.4:5060 UAC=snom760/8.7.5.35 ID=3134363034303936373734333636-kohhuu6fsruo B=<null>

For tests I set the ping_nated_only to 0, so all clients should receive a keepalive.
I hoped that the core sends now:
- OPTIONS with data from usrloc
- uses the path from usrloc to send the OPTIONS to the edge server, and then I could relay to the client

But the core sends now the 4 bytes (zero filled) UDP packages to the edge server.
Why the nathelper module doesn't use the usrloc?
Maybe you could give a hint, what is missing in the config.

Kind regards,
Julian Santer
Raiffeisen OnLine

Am 03.03.2016 um 17:05 schrieb Julian Santer:
> Hi guys,
>
> we tried to switch from nat_traversal to nathelper.
> The reason is the keepalive mechanism.
>
> The nat_traversal module sends OPTIONS with the following to header: sip:UAC_IP:UAC_PORT
> Most of the UAC's answers with a 404 Not found.
> On AVM Fritzbox with firmware >= 6.04, this OPTIONS may activate a security feature.
> So after a certain time, the Fritzbox blocks all packages send from our proxy.
> As we have ca. 80% AVM Fritzbox as UAC, we got a big problem.
> So we deactivated the nat_keepalive vor this UAC's and we have to enable the keepalive Feature on the Fritzbox.
>
> The better solution would be, if we could send OPTIONS with a to header like: sip:username at UAC_IP:UAC_PORT.
> As I understood the nathelper module could send OPTIONS like this. Because it is looking into the userloc table. Right?
>
> The nathelper module is on our edge server, the registrar on our core server.
> The problem now is, that the module does not sends any OPTIONS at all.
>
> We are using the version 2.1.2 from git. Last pull on 2016/03/01.
>
> The nathelper config looks like:
> #### nathelper module
> loadmodule "nathelper.so"
> modparam("nathelper", "natping_interval", 56)
> modparam("nathelper", "ping_nated_only", 0)
> modparam("nathelper", "natping_partitions", 1)
> modparam("nathelper", "natping_socket", "IP_PROXY:5060")
> modparam("nathelper", "sipping_bflag", "SIP_PING_FLAG")
> modparam("nathelper", "sipping_from", "sip:keepalive at DEFAULT_REALM")
> modparam("nathelper", "sipping_method", "OPTIONS")
> modparam("nathelper", "nortpproxy_str", "")
> modparam("nathelper", "natping_tcp", 0)
>
> For the test, in the register route I tried to set always the sipping_bflag:
> if (proto == UDP)
> {
>      setbflag(SIP_PING_FLAG);
>      xlog("L_INFO", "Nat keepalive sip_ping_flag - LF_BASE");
> }
>
> But in my traces I can't find any OPTIONS send by the nathelper module.
> Could you give me a hint?
>
> Kind regards,
> Julian Santer
> Raiffeisen OnLine
>
>





More information about the Users mailing list