[SR-Users] NatHelper ignoring force_socket module parameter
Daniel-Constantin Mierla
miconda at gmail.com
Fri Aug 7 19:36:51 CEST 2015
You have to set server_id to be different for each node in order to send
keepalive only for registration received directly, however, iirc, this
feature is only in master branch.
Cheers,
Daniel
On 23/07/15 15:19, Asgaroth wrote:
> some more info on this one, it looks like this is only happening on
> nodes that have been replicated to, for example,
>
> If a registration is processed on node 1, then the nathelper send the
> locally generated options message out of the correct socket, I presume
> it gets the sending socket details from the socket information stored
> by the registrar. (Socket:: udp:10.7.0.175:5060)
>
> However, when this registration is replicated (via dmq_usrloc), there
> is no local socket information for the particular contact, the
> nathelper module seems to think that it needs to ping this
> registration contact (it is natted) and sends it out of the wrong
> interface even if the force_socket module parameter is set for the
> nathelper module.
>
> That brings me on to my next question, why is the nathelper module
> attempting to ping natted contacts from all registrar's, should it not
> ping from the registrar that processed the last registration attempt?
>
> I had a read of the nathelper module documentation, but I cannot see
> any obvious setting that would tell nathelper to only ping from the
> registrar processing the request.
>
> Is my understanding of how nathelper is supposed to work correct when
> it comes to multiple registrar's with registration replication? Myabe
> I am missing something here, any tips/tricks/suggestions/beatings most
> welcome
>
> Thanks
>
> On 23/07/2015 12:14, Asgaroth wrote:
>> Hi All,
>>
>> I have a strange issue, I have set the module parameter for
>> nathelper's force_socket to a specfic ip/port, however, when I
>> perform a sip trace I can see that all locally generated options
>> messages are not sent from the socket defined in the modules parameters.
>>
>> I am not setting $fs anywhere in the script, so I am not over-writing
>> it. Do any of the other module parameters have a bearing on if
>> nathelper uses the force_socket parameter?
>>
>> My current nathelper settings are:
>>
>> modparam("nathelper", "received_avp", "$avp(RECEIVED)")
>> modparam("nathelper", "natping_interval", 20)
>> modparam("nathelper", "natping_processes", 4)
>> modparam("nathelper", "ping_nated_only", 1)
>> modparam("nathelper", "sipping_from", "sip:keepalive at domain.com")
>> modparam("nathelper", "sipping_method", "OPTIONS")
>> modparam("nathelper", "sipping_bflag", NAT_BFLAG)
>> modparam("nathelper", "force_socket", "1.2.3.4:5060")
>>
>> I am using kamailio v4.3.1:
>>
>> # kamailio -V
>> version: kamailio 4.3.1 (x86_64/linux) f38e67
>> flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS,
>> USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM,
>> SHM_MMAP, PKG_MALLOC, F_MALLOC, DBG_F_MALLOC, USE_FUTEX,
>> FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
>> USE_DST_BLACKLIST, HAVE_RESOLV_RES
>> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
>> MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
>> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
>> id: f38e67
>> compiled on 18:15:23 Jul 20 2015 with gcc 4.4.7
>>
>> Thanks
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
More information about the sr-users
mailing list