<p dir="ltr">Hi Bogdan,</p>
<p dir="ltr">Even if I remove the 5 second timeout by removing #modparam(&quot;tm&quot;, &quot;fr_inv_timeout&quot;, 30), the timeout occurs after about 20 seconds. What do you suggest is the solution? </p>
<div class="gmail_quot&lt;blockquote class=" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <tt>Hi Nabeel,<br>
      <br>
      Your OpenSIPS tries to connect via TCP to the destination and to
      avoid blocking it is doing it async:<br>
      <br>
    </tt><br>
    <div>Feb  1 19:22:13 server1 opensips: Feb  1 19:22:13
      [20587] DBG:core:print_ip: tcpconn_new: new tcp connection to:
      188.29.165.162</div>
    <div>Feb  1 19:22:13 server1 opensips: Feb  1 19:22:13
      [20587] DBG:core:tcpconn_new: on port 58985, proto 2</div>
    Feb  1 19:22:13 server1 opensips: Feb  1 19:22:13 [20587]
    DBG:core:proto_tcp_send: Successfully started async connection<br>
    <br>
    After that, in 5 seconds, the final timer hits (as timeout for no
    reply), while the TCP connect still haven;t finished (so there is no
    actual packet sent out).<br>
    <br>
    Regards,<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>
    <div>On 01.02.2016 21:35, Nabeel wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hi Bogdan,
        <div><br>
        </div>
        <div>Below is the requested log for TCP call attempt.  User 1111
          is trying to call user 2222 via OpenSIPS server <span>162.248.6.120</span> :</div>
        <div><br>
        </div>
        <div><a href="http://pastebin.com/UQ9mEemd" target="_blank">http://pastebin.com/UQ9mEemd</a><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On 1 February 2016 at 09:41,
          Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank"><a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a></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,<br>
                <br>
                I strongly suggest to look into the opensips logs and
                see what opensips try to do with the call. Based on your
                saying (that you see a timeout), I suspect your OpenSIPS
                tries to deliver the call over TCP to a destination
                which does not listen on TCP.<br>
                If you do not know hoe to interpret the logs, run
                opensips in debug=4 mode, upload the logs corresponding
                the INVITE execution and provide the link.<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>
                <div>
                  <div>On 31.01.2016 16:28, Nabeel wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div>
                    <div dir="ltr">Without using alias=<a href="http://domain.com" target="_blank">domain.com</a>, TCP still does
                      not work.  My initial request for someone to test
                      this using Linphone remains. Please test and let
                      me know if you can call using TCP with OpenSIPS
                      listening on an IP address.</div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On 31 January 2016 at
                        09:28, Nabeel <span dir="ltr">&lt;<a href="mailto:nabeelshikder@gmail.com" target="_blank"><a href="mailto:nabeelshikder@gmail.com" target="_blank">nabeelshikder@gmail.com</a></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">On further testing, using the
                            IP address instead of the domain name in the
                            URI setting of Linphone works with TCP, so I
                            think this might be to do with SRV/NAPTR
                            records associated with the domain.</div>
                          <div>
                            <div>
                              <div class="gmail_extra"><br>
                                <div class="gmail_quote">On 31 January
                                  2016 at 08:29, Nabeel <span dir="ltr">&lt;<a href="mailto:nabeelshikder@gmail.com" target="_blank"><a href="mailto:nabeelshikder@gmail.com" target="_blank">nabeelshikder@gmail.com</a></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"><span style="font-size:12.8px">Hello,</span>
                                      <div style="font-size:12.8px"><br>
                                      </div>
                                      <div style="font-size:12.8px">There
                                        seems to be a problem with calls
                                        over TCP using Linphone, and
                                        since Linphone is a popular open
                                        source application, I would like
                                        someone to please verify this
                                        problem. Calls work fine with
                                        Linphone over UDP, but after
                                        registering with TCP using the
                                        same credentials, calls do not
                                        connect at all and lead to a
                                        request timeout.  A request
                                        timeout does not say much about
                                        the cause, but in this case I
                                        suspect there is something wrong
                                        with TCP on the server side. I
                                        would like someone to please
                                        install Linphone on your phone
                                        and connect to your OpenSIPS
                                        server using UDP and TCP. 
                                        Please report here if the calls
                                        work over both transports.  </div>
                                    </div>
                                  </blockquote>
                                </div>
                                <br>
                              </div>
                            </div>
                          </div>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <span>
                  <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>
                </span></blockquote>
              <br>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </div>

</div>