<div dir="ltr">Hi Nabeel,<div><br></div><div>Which test are you referring to ?</div><div>Have you tried adding the following by Bogdan in your .cfg file ?</div><div><br></div><div><tt>An issue may be the fact the default script does non-SIP pinging </tt><tt>(which is unidirectional), so the NAT may close. Add the followings:</tt><tt><br></tt><tt>1) </tt><tt>modparam(&quot;nathelper&quot;, &quot;sipping_bflag&quot;, &quot;SIP_PING_FLAG&quot;)</tt><tt><br></tt><tt>   </tt><tt>modparam(&quot;nathelper&quot;, &quot;sipping_from&quot;, <a href="mailto:sip:pinger@xx.xx.xx.xx" target="_blank">&quot;sip:pinger@xx.xx.xx.xx&quot;</a>)</tt><tt><br><br></tt><tt>2) setbflag(</tt><tt>SIP_PING_FLAG); before doing save()</tt><tt><br></tt></div><div><tt><br></tt></div>The above worked or you haven&#39;t tried them ?<div><tt><br></tt></div><div>Why do you&#39;ve this at line 294 in your script: <span style="color:rgb(0,0,0);font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,monospace,serif;font-size:12px;line-height:21px"> </span><span style="color:rgb(0,0,0);font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,monospace,serif;font-size:12px;line-height:21px">if (   0 ) setflag(TCP_PERSISTENT);</span>?? Just above or after this you can write this: <tt>setbflag(SIP_PING_FLAG); </tt>as mentioned by Bogdan.</div><div><tt><br></tt></div>BR,<br>Sammy</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 7, 2015 at 6:21 AM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <tt>Hi Nabeel,<br>
      <br>
      Using TCP gives an advantage over UDP as being connection
      oriented, it force the NAT pinhole to stay open. Nevertheless,
      using the SIP pinging with UDP should also have fixed the problem.<br>
      <br>
      I will update the default cfg to use SIP pinging rather than
      simple UDP pinging.<br>
      <br>
      Thanks and Regards,<br>
    </tt><span class="">
    <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
    </span><div><div class="h5"><div>On 07.08.2015 12:32, Nabeel wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>SamyGo,</div>
        <div><br>
        </div>
        <div>I tried the test you suggested but it did not work.</div>
        <div><br>
        </div>
        <div>Bogdan,</div>
        <div><br>
        </div>
        <div>After switching to TCP and adding your suggestions along
          with the following parameters, the timeout errors seem to be
          resolved:</div>
        <div><br>
        </div>
        <div><b>tcp_async=1</b><br>
        </div>
        <div><b>tcp_connect_timeout=99999</b></div>
        <div><b>tcp_send_timeout=99999</b></div>
        <div><b>
            <div>modparam(&quot;nathelper&quot;, &quot;nortpproxy_str&quot;,
              &quot;a=nortpproxy:yes\r\n&quot;)</div>
            <div><br>
            </div>
          </b></div>
        <div>I&#39;m not sure in exactly what combination works best, but
          perhaps these should be included in the default residential
          script?</div>
        <div><b><br>
          </b></div>
        <div>Thanks for the help... I&#39;ll be back with more questions.</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div class="gmail_extra">
          <div class="gmail_quote">On 6 August 2015 at 15:41,
            Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div text="#000000" bgcolor="#FFFFFF"> <tt>Hi Nab</tt><tt>eel,</tt><tt><br>
                </tt><tt><br>
                </tt><tt>This time the SIP trace looks ok - the message
                  is sent to a public IP and not a private one (as shown
                  in the prev capture). Also the usrloc data looks ok,
                  telling that the NAT traversal work</tt><tt>s ok.</tt><tt><br>
                </tt><tt>As you have Mobile Data, some operators do
                  filter SIP, so not sure what say.</tt><tt><br>
                </tt><tt><br>
                </tt><tt>Do you see the sip messages going back and
                  forward during the </tt><tt>registration process ? </tt><tt><br>
                </tt><tt><br>
                </tt><tt>An issue may be the fact the default script
                  does non-SIP pinging </tt><tt>(which is
                  unidirectional), so the NAT may close. Add the
                  followings:</tt><tt><br>
                </tt><tt>1) </tt><tt>modparam(&quot;nathelper&quot;,
                  &quot;sipping_bflag&quot;, &quot;SIP_PING_FLAG&quot;)</tt><tt><br>
                </tt><tt>   </tt><tt>modparam(&quot;nathelper&quot;,
                  &quot;sipping_from&quot;, <a href="mailto:sip:pinger@xx.xx.xx.xx" target="_blank">&quot;sip:pinger@xx.xx.xx.xx&quot;</a>)</tt><tt><br>
                  <br>
                </tt><tt>2) setbflag(</tt><tt>SIP_PING_FLAG); before
                  doing save()</tt><tt><br>
                </tt><tt><br>
                </tt><tt>You should see OpenSIPS doing </tt><tt>keep
                  alive with OPTIONS requests.<br>
                </tt><span><tt>Reg</tt><tt>ards,</tt><br>
                  <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                </span>
                <div>
                  <div>
                    <div>On 06.08.2015 14:59, Nabeel wrote:<br>
                    </div>
                    <blockquote type="cite">
                      <p dir="ltr">My OpenSIPS runs on a public IP.  The
                        callee was connected to Wi-Fi in my first test
                        earlier, but in the second test the callee was
                        connected to a public IP  (public mobile
                        network).  In both cases, the same &#39;404 timeout&#39;
                        error occurred on call attempt.  The SIP trace
                        for the second case is at this link: </p>
                      <p dir="ltr"><a href="http://pastebin.com/jGxRQ34q" target="_blank">http://pastebin.com/jGxRQ34q</a></p>
                      <p dir="ltr">Regarding private IP, you said it&#39;s
                        impossible to route from public IP to private
                        IP.  Although at the IP level this may be true,
                        even if the user is on Wi-Fi, the whole point of
                        NAT traversal is that the user&#39;s public IP is
                        discovered and the call can get connected, is
                        that not right?  I&#39;m fact,  using a TURN server
                        and a different SIP proxy, I was able to connect
                        these same devices under the same networks, so I
                        know this should be possible.  I feel something
                        is not configured correctly in OpenSIPS /
                        rtpproxy.</p>
                      <p dir="ltr">I did &quot;opensipsctl ul show&quot; and the
                        results seem normal; please check it:</p>
                      <p dir="ltr"><a href="http://pastebin.com/n1BbTuMK" target="_blank">http://pastebin.com/n1BbTuMK</a></p>
                      <p dir="ltr">Perhaps the NAT processing just needs
                        a bit more time; in thar case what are the
                        config options to increase the request timeout
                        for UDP?  I have seen the &#39;tcp_send_timeout&#39; and
                        &#39;tcp_connect_timeout&#39; options for TCP, but
                        please let me know if there are similar options
                        for UDP.</p>
                      <div class="gmail_quote">On 6 Aug 2015 12:08,
                        &quot;Bogdan-Andrei Iancu&quot; &lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;
                        wrote:<br type="attribution">
                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                          <div text="#000000" bgcolor="#FFFFFF"> <tt>Nabeel,<br>
                              <br>
                              I suppose you OpenSIPS seats on a public
                              IP, right ? The callee looks to have a
                              private IP. And, at IP level, it is
                              impossible to route from a public IP to a
                              private one.<br>
                              <br>
                              I see your script has NAT traversal
                              support. My question is - did the callee
                              properly registered via this script ? can
                              you do an &quot;opensipsctl ul show&quot; to see the
                              callee&#39;s registration ?<br>
                              <br>
                              Regards,<br>
                            </tt>
                            <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                            <div>On 06.08.2015 07:14, Nabeel wrote:<br>
                            </div>
                            <blockquote type="cite">
                              <div dir="ltr">Hi,
                                <div><br>
                                </div>
                                <div>Yes, the destination IP is <span style="font-size:12.8000001907349px"> </span><span><a href="http://192.168.0.19:60912/" target="_blank">192.168.0.19:60912</a> and

                                    both phones are registered to
                                    OpenSIPS.  In this case, the callee
                                    is connected to Wi-Fi (hence 192.xx
                                    IP address) and the caller is
                                    connected to a mobile network.</span></div>
                                <div><span><br>
                                  </span></div>
                                <div><font color="#000000" face="Consolas, Menlo, Monaco,
                                    Lucida Console, Liberation Mono,
                                    DejaVu Sans Mono, Bitstream Vera
                                    Sans Mono, monospace, serif"><span style="font-size:12px;line-height:21px">The

                                      opensips.cfg I am using was
                                      generated from &#39;make menuconfig&#39;,
                                      except with the addition of
                                      &quot;alias=<a href="http://domain.com" target="_blank">domain.com</a>&quot;.
                                      I have attached my config file at
                                      this link:</span></font></div>
                                <div><font color="#000000" face="Consolas, Menlo, Monaco,
                                    Lucida Console, Liberation Mono,
                                    DejaVu Sans Mono, Bitstream Vera
                                    Sans Mono, monospace, serif"><span style="font-size:12px;line-height:21px"><br>
                                    </span></font></div>
                                <div><font color="#000000" face="Consolas, Menlo, Monaco,
                                    Lucida Console, Liberation Mono,
                                    DejaVu Sans Mono, Bitstream Vera
                                    Sans Mono, monospace, serif"><span style="font-size:12px;line-height:21px"><a href="http://pastebin.com/0QRyC938" target="_blank">http://pastebin.com/0QRyC938</a></span><br>
                                  </font></div>
                                <div><font color="#000000" face="Consolas, Menlo, Monaco,
                                    Lucida Console, Liberation Mono,
                                    DejaVu Sans Mono, Bitstream Vera
                                    Sans Mono, monospace, serif"><span style="font-size:12px;line-height:21px"><br>
                                    </span></font></div>
                                <div><font color="#000000" face="Consolas, Menlo, Monaco,
                                    Lucida Console, Liberation Mono,
                                    DejaVu Sans Mono, Bitstream Vera
                                    Sans Mono, monospace, serif"><span style="font-size:12px;line-height:21px"><br>
                                    </span></font></div>
                              </div>
                              <div class="gmail_extra"><br>
                                <div class="gmail_quote">On 6 August
                                  2015 at 05:00, SamyGo <span dir="ltr">&lt;<a href="mailto:govoiper@gmail.com" target="_blank">govoiper@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">
                                    <div dir="ltr">Hi Nabeel,
                                      <div>Quick question; what is this
                                        destination ip? <span><a href="http://192.168.0.19:60912" target="_blank">192.168.0.19:60912</a>
                                          ?</span><span> - </span>Destination


                                        User Agent Registered on
                                        OpenSIPS?</div>
                                      <div>Can you share the
                                        opensips.cfg code snippet for
                                        this call ?</div>
                                    </div>
                                    <div class="gmail_extra"><br>
                                      <div class="gmail_quote">
                                        <div>
                                          <div>On Wed, Aug 5, 2015 at
                                            11:55 PM, Nabeel <span dir="ltr">&lt;<a href="mailto:nabeelshikder@gmail.com" target="_blank">nabeelshikder@gmail.com</a>&gt;</span>
                                            wrote:<br>
                                          </div>
                                        </div>
                                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                          <div>
                                            <div>
                                              <div dir="ltr">
                                                <div>Hi,</div>
                                                <div><br>
                                                </div>
                                                <div>I am using the
                                                  residential script
                                                  generated by &#39;make
                                                  menuconfig&#39;, with UDP
                                                  and NAT support
                                                  enabled.  I added
                                                  &quot;alias=<a href="http://domain.com" target="_blank">domain.com</a>&quot; to the config
                                                  because otherwise the
                                                  UA did not register
                                                  with my domain (<a href="mailto:username@domain.com" target="_blank">username@domain.com</a>). When


                                                  I attempt to make a
                                                  call, I see &#39;408
                                                  Request Timeout&#39; in
                                                  the sip trace and the
                                                  call does not
                                                  connect.  Please check
                                                  the log/trace below
                                                  and advise how to fix
                                                  this.</div>
                                                <div><br>
                                                </div>
                                                <div>SIP trace:</div>
                                                <div><br>
                                                </div>
                                                <a href="http://pastebin.com/u5h9qGNr" target="_blank">http://pastebin.com/u5h9qGNr</a><br>
                                                <div><br>
                                                </div>
                                                <div>OpenSIPS log: </div>
                                                <div><br>
                                                </div>
                                                <div><a href="http://pastebin.com/B8PUCKh0" target="_blank">http://pastebin.com/B8PUCKh0</a><br>
                                                </div>
                                              </div>
                                              <br>
                                            </div>
                                          </div>
_______________________________________________<br>
                                          Users mailing list<br>
                                          <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
                                          <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                                          <br>
                                        </blockquote>
                                      </div>
                                      <br>
                                    </div>
                                    <br>
_______________________________________________<br>
                                    Users mailing list<br>
                                    <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
                                    <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                                    <br>
                                  </blockquote>
                                </div>
                                <br>
                              </div>
                              <br>
                              <fieldset></fieldset>
                              <br>
                              <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                            </blockquote>
                            <br>
                          </div>
                        </blockquote>
                      </div>
                    </blockquote>
                    <br>
                  </div>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div>