<div dir="ltr"><div class="gmail_extra">On Fri, Feb 27, 2015 at 3:11 PM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div><div class="h5"><br></div></div>
    I would use an extra branch flag here.<br>
    <br>
    Keepalives are sent based on nat_bflag and sipping_bflag. You can
    set both no matter it is actually a register from a natted phone or
    not.<br></div></blockquote><div><br></div><div>That's the solution we tried to implement this afternoon. We saved an additional location entry on the loadbalancer (just as a proof of concept) and then set the NAT flag configured for the nathelper module. Via kamcmd I can see that the location entry is there. But I don't see any keepalives being sent out. I even set the ping_nated_only parameter to 0 so that all clients would get pings. On the proxy I can see them (for IPv4 cllients). Is there anything special? This is what I did:</div><div><br></div><div><div>modparam("registrar", "max_contacts", 50)</div><div>modparam("registrar", "received_avp", "$(avp(i:801))")</div><div>modparam("registrar", "default_expires", 600)</div><div>modparam("registrar", "min_expires", 60)</div><div>modparam("registrar", "max_expires", 600)</div><div>modparam("registrar", "gruu_enabled", 0)</div><div><br></div><div>modparam("usrloc", "db_mode", 0)</div><div>modparam("usrloc", "nat_bflag", 4)</div><div>modparam("usrloc", "use_domain", 1)</div><div>modparam("usrloc", "hash_size", 14)</div><div>modparam("usrloc", "timer_interval", 180)</div><div>modparam("usrloc", "timer_procs", 4)</div><div><br></div><div>modparam("nathelper", "received_avp", "$(avp(i:801))")</div><div>modparam("nathelper", "natping_interval" , 14)</div><div>modparam("nathelper", "ping_nated_only" , 0)</div><div>modparam("nathelper", "sipping_bflag", 20)</div><div>modparam("nathelper", "sipping_from", "<a href="mailto:natping@sipgate.de">natping@sipgate.de</a>")</div></div><div><br></div><div>And then in the onreply_route I added the following:</div><div><br></div><div><div>if (is_method("REGISTER") && $rs == 200) {</div><div><span style="white-space:pre">        </span>setbflag(4);</div><div>        save("location");</div><div>}</div></div><div><br></div><div>(Again, this is just a proof of concept.)</div><div><br></div><div>Now I would expect to see NAT pings every 14 seconds to each registered client. But I don't see any.</div><div><br></div><div>Does the NAT pinging work only for IPv4 maybe?</div><div><br></div><div>Best Regards,</div><div>Sebastian</div></div><div class="gmail_signature"><div dir="ltr"></div></div>
</div></div>