Looks like sipping does not work with TCP transport. I looked at the code it expects the<div>client waits on UDP port.</div><div><br></div><div>code snippet from nathelper.c</div><div><br></div><div><div>              if (curi.proto != PROTO_UDP &amp;&amp; curi.proto != PROTO_NONE)</div>
<div>                        continue;</div></div><div><br></div><div>I would like it to use TCP transport and send the packet to the client on the same socket</div><div>that the client has connected to server with. </div>
<div><br></div><div>Any suggestions on how to do this? </div><div><br></div><div>Thanks</div><div>Krish Kura</div><div><br><div class="gmail_quote">On Sat, Oct 1, 2011 at 6:21 PM, Krishna Kurapati <span dir="ltr">&lt;<a href="mailto:kkurapat@gmail.com">kkurapat@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<div><br></div><div>I am  hitting bit of a wall here. </div><div><br></div><div>- I am setting bflags for NAT, and SIPPING before save(&quot;location&quot;) however, </div>
<div>when I do &quot;kamctl ul show&quot;, the Cflag is 0. </div>
<div><br></div><div>I also checked see if the bflags are set or not in the register routine - they are being set. </div><div><br></div><div>What am I missing?</div><div><br></div><div>snippets of the config files.</div><div>

<div><br></div><div>#!define FLB_NATB 6</div><div>#!define FLB_NATSIPPING 7</div></div><div>modparam(&quot;nathelper&quot;, &quot;natping_interval&quot;, 30)</div><div>modparam(&quot;nathelper&quot;, &quot;ping_nated_only&quot;, 1)</div>

<div>modparam(&quot;nathelper&quot;, &quot;sipping_bflag&quot;, FLB_NATSIPPING)</div><div>modparam(&quot;nathelper&quot;, &quot;sipping_method&quot;, &quot;INFO&quot;)</div><div>modparam(&quot;nathelper&quot;, &quot;sipping_from&quot;, &quot;<a href="mailto:sip%3Apinger@50.62.1.7" target="_blank">sip:pinger@50.62.1.7</a>&quot;)</div>

<div><br></div><div># params needed for NAT traversal in other modules</div><div>modparam(&quot;nathelper|registrar|usrloc&quot;, &quot;received_avp&quot;, &quot;$avp(RECEIVED)&quot;)</div><div>modparam(&quot;usrloc&quot;, &quot;nat_bflag&quot;, FLB_NATB)</div>

<div><br></div><div><div># Caller NAT detection route</div><div>route[NAT] {</div><div>#!ifdef WITH_NAT</div><div>        force_rport();</div><div>        if (nat_uac_test(&quot;19&quot;)) {</div><div>                if (method==&quot;REGISTER&quot;) {</div>

<div>                        fix_nated_register();</div><div>                } else {</div><div>                        fix_nated_contact();</div><div>                }</div><div>                setflag(FLT_NATS);</div><div>

                setbflag(FLB_NATB);</div><div>        }</div><div>#!endif</div><div>        return;</div><div>}</div></div><div><br></div><div><div># Handle SIP registrations</div><div>route[REGISTRAR] {</div><div>        if (is_method(&quot;REGISTER&quot;))</div>

<div>        {</div><div>                xlog(&quot;L_ALERT&quot;, &quot;REGISTER: From $fU, $fd  To $tU, $td&quot;);</div><div>                if (isflagset(FLT_NATS) || isbflagset(FLB_NATB))</div><div>                {</div>

<div>                        setbflag(FLB_NATB); </div><div>                        # uncomment next line to do SIP NAT pinging </div><div>                        setbflag(FLB_NATSIPPING);  </div><div>                }</div>

<div>                # 7/28/11 - make sure only one contact location is active </div><div>                # at any given time</div><div>                # unregister(&quot;location&quot;, &quot;$rU&quot;);</div><div>                if (isbflagset(FLB_NATB))</div>

<div>                {</div></div><div><div>                        xlog(&quot;L_ALERT&quot;, &quot;REGISTRAR: For $fU, $fd  FLB_NATB set&quot;);</div><div>                }</div><div><br></div><div>                if (isbflagset(FLB_NATSIPPING))</div>

<div>                {</div><div>                        xlog(&quot;L_ALERT&quot;, &quot;REGISTRAR: For $fU, $fd  FLB_NATSIPPING set&quot;);</div><div>                }</div><div><br></div><div>                if (!save(&quot;location&quot;))</div>

<div>                {</div><div>                        xlog(&quot;L_ALERT&quot;, &quot;REGISTRAR: From $fU, $fd  Location could not be saved&quot;);</div><div>                        sl_reply_error();</div><div>                }</div>

<div><br></div><div>                exit;</div><div>        }</div></div><div>}</div><div><br></div><div> </div><div>The debug log snippets</div><div>==================</div><div><div>Oct  1 15:58:30 siptest /usr/sbin/kamailio[19515]: ALERT: &lt;script&gt;: REGISTER: From p_krishna_test_com, 50.62.1.7  To p_krishna_test_com, 50.62.1.7</div>

<div>Oct  1 15:58:30 siptest /usr/sbin/kamailio[19515]: ALERT: &lt;script&gt;: REGISTRAR: For p_krishna_test_com, 50.62.1.7  FLB_NATB set</div><div>Oct  1 15:58:30 siptest /usr/sbin/kamailio[19515]: ALERT: &lt;script&gt;: REGISTRAR: For p_krishna_test_com, 50.62.1.7  FLB_NATSIPPING set</div>

<div>Oct  1 15:58:30 siptest /usr/sbin/kamailio[19515]: DEBUG: sl [sl.c:278]: reply in stateless mode (sl)</div></div><div><br></div><div>Output of kamctl command</div><div>====================</div><div><div>$ sudo kamctl ul show</div>

<div>Domain:: location table=512 records=1 max_slot=1</div><div><span style="white-space:pre-wrap">        </span>AOR:: p_krishna_test_com</div><div><span style="white-space:pre-wrap">                </span>Contact:: sip:p_krishna_test_com@75.62.17.45:50073;transport=tcp;ob Q=</div>

<div><span style="white-space:pre-wrap">                        </span>Expires:: 287</div><div><span style="white-space:pre-wrap">                        </span>Callid:: ad2d3a7bf39a4345861db1661576a7f3</div><div><span style="white-space:pre-wrap">                        </span>Cseq:: 54856</div>

<div><span style="white-space:pre-wrap">                        </span>User-agent:: QliqDesktop 1.0.0 (pjproject 1.10.0/win32)</div><div><span style="white-space:pre-wrap">                        </span>State:: CS_NEW</div><div>
<span style="white-space:pre-wrap">                        </span>Flags:: 0</div><div><span style="white-space:pre-wrap">                        </span>Cflag:: 0                                                          &lt;================= Cflag is not being set.</div>

<div><span style="white-space:pre-wrap">                        </span>Socket:: tcp:<a href="http://10.1.0.6:5060" target="_blank">10.1.0.6:5060</a></div><div><span style="white-space:pre-wrap">                        </span>Methods:: 8143</div>
</div><div><br></div><div>Thanks</div><div>Krish Kura</div>
</blockquote></div><br></div>