<div dir="ltr"><div><div>Dear Bodgan,<br>This is what i am doing for ACK path (This is minus all the other crap like auth, redis stuff). I dont think that there would be any loop here.<br><br><br>if (nat_uac_test(&quot;19&quot;)) {<br>
</div><div>   if (is_method(&quot;REGISTER&quot;)) {<br>      fix_nated_register();<br>   } else {<br>      fix_nated_contact();<br>   };<br></div><div>}<br><br></div><div>force_rport();<br></div><div><br></div>if (loose_route()) {<br>
</div><div>   if (loose_route()) {<br></div><div>      # route it out to whatever destination was set by loose_route()<br>      # in $du (destination URI).<br>      route(2);<br></div><div>   }<br></div><div>} else {<br></div>
<div>   if ( is_method(&quot;ACK&quot;) ) {<br></div><div>      if (t_check_trans()) {<br></div><div>         t_relay();<br></div><div>         exit;<br></div><div>      } else {<br></div><div>         exit;<br></div><div>
      }<br></div><div>   }<br></div><div>}<br><br></div><div>route[2] {<br></div><div>   if (is_direction(&quot;downstream&quot;)) {<br>      xlog(&quot;L_NOTICE&quot;, &quot;[$pr:$fU@$si:$sp]: Sequencial &#39;$rm&#39; request from caller &#39;$fU&#39; for call from &#39;$fu&#39; to &#39;$ru&#39; \n&quot;);<br>
   } else {<br>      xlog(&quot;L_NOTICE&quot;, &quot;[$pr:$fU@$si:$sp]: Sequencial &#39;$rm&#39; request from callee &#39;$fU&#39; for call from &#39;$ru&#39; to &#39;$fu&#39; \n&quot;);<br></div><div>   };<br>   if(is_method(&quot;ACK&quot;)) {<br>
</div><div>      $avp(pdd) = 0;<br></div><div>      $avp(pdd) = $Ts - $(avp(pdd){<a href="http://s.int">s.int</a>});<br></div><div>      xlog(&quot;L_NOTICE&quot;, &quot;[$pr:$fU@$si:$sp]: Post Dial Delay of Call-ID &#39;$ci&#39; from &#39;$fu&#39; to &#39;$ru&#39; is &#39;$avp(pdd)&#39; at &#39;$time(%F %T %Z)&#39; \n&quot;);<br>
</div><div>   }<br></div><div>   if (!t_relay()) {<br></div><div>      sl_reply_error();<br></div><div>   }<br></div><div>}<br></div><div><br><br></div> <br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, May 22, 2013 at 10:01 PM, 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">
<u></u>

  
    
  
  <div text="#000000" bgcolor="#ffffff">
    <tt>No, it is not a retransmission as it is the same process and
      there is no second set of logs for receiving a message from
      network:<br>
      <br>
      May 20 11:34:52 jkt-svr-mvapp-2 rtsip-service[1411]:
      DBG:core:parse_msg: SIP Request:<br>
      May 20 11:34:52 jkt-svr-mvapp-2 rtsip-service[1411]:
      DBG:core:parse_msg:  method:  &lt;ACK&gt;<br>
      May 20 11:34:52 jkt-svr-mvapp-2 rtsip-service[1411]:
      DBG:core:parse_msg:  uri:    
<a>&lt;sip:622190004002@xx.xx.xx.xx:2374;transport=UDP;rinstance=77930ffd530697a7;nat=yes&gt;</a><br>
      May 20 11:34:52 jkt-svr-mvapp-2 rtsip-service[1411]:
      DBG:core:parse_msg:  version: &lt;SIP/2.0&gt;<br>
      ....<br>
      May 20 11:34:52 jkt-svr-mvapp-2 rtsip-service[1411]:
      DBG:core:receive_msg: preparing to run routing scripts...<br>
      ...<br>
      May 20 11:34:52 jkt-svr-mvapp-2 rtsip-service[1411]:
      DBG:rr:after_loose: Topmost route URI:
      &#39;<a>sip:622190004002@xx.xx.xx.xx:6000;lr;ftag=2e76e266;did=c7c.34372c92</a>&#39;
      is me<br>
      ...<br>
      May 20 11:34:52 jkt-svr-mvapp-2 rtsip-service[1411]:
      [<a href="mailto:udp:622190004001@39.42.183.233:7085" target="_blank">udp:622190004001@39.42.183.233:7085</a>]: Sequencial &#39;ACK&#39; request
      from caller &#39;622......&#39; for call from .......<br>
      ....<br>
      May 20 11:34:52 jkt-svr-mvapp-2 rtsip-service[1411]:
      DBG:rr:after_loose: Topmost route URI:
      &#39;<a>sip:622190004002@xx.xx.xx.xx:6000;lr;ftag=2e76e266;did=c7c.34372c92</a>&#39;
      is me<br>
      ...<br>
      May 20 11:34:52 jkt-svr-mvapp-2 rtsip-service[1411]:
      [<a href="mailto:udp:622190004001@39.42.183.233:7085" target="_blank">udp:622190004001@39.42.183.233:7085</a>]: Sequencial &#39;ACK&#39; request
      from caller &#39;622.....&#39; for call from ........<br>
      <br>
      <br>
      It is clearly a loop.<br>
      <br>
      Regards,<br>
      <br>
    </tt><div class="im">
    <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>
    <br></div><div><div class="h5">
    On 05/22/2013 03:21 PM, <a href="mailto:qasimakhan@gmail.com" target="_blank">qasimakhan@gmail.com</a> wrote:
    <blockquote type="cite">
      <div dir="ltr">I think that is retransmission of ACK packet
        because it didn&#39;t get its 200 ok back.<br>
        <br>
        Regards,<br>
        Qasim<br>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Tue, May 21, 2013 at 10:08 PM,
          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:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div text="#000000" bgcolor="#ffffff"> <tt>Hi Qasim,<br>
                <br>
                Looking at the ACK related logs, I see you get the
                script log<br>
                     Sequencial &#39;ACK&#39; request from caller &#39;622190004001&#39;
                for call from .....<br>
                <br>
                twice - also the logs from the loose_route() function -
                I suspect you loop somehow in your script and a route is
                triggered twice (the route doing loose_route)<br>
                <br>
                Regards,<br>
              </tt>
              <div>
                <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>
                <br>
              </div>
              <div>
                <div> On 05/20/2013 02:46 PM, <a href="mailto:qasimakhan@gmail.com" target="_blank">qasimakhan@gmail.com</a>
                  wrote:
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div>Hi Bodgan,<br>
                        <br>
                      </div>
                      Sorry for the late reply as i was traveling this
                      weekend. Please find attached call logs with debug
                      mode 4.<br>
                      <br>
                      Regards,<br>
                      Qasim<br>
                    </div>
                    <div class="gmail_extra"><br>
                      <br>
                      <div class="gmail_quote"> On Fri, May 17, 2013 at
                        8:50 PM, 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:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                          <div text="#000000" bgcolor="#ffffff"> <tt>Funny,
                              as I do not see anything wrong on a first
                              look - while running in debug mode (4),
                              please send me the logs corresponding to
                              the ACK processing.<br>
                              <br>
                              Regards,<br>
                            </tt>
                            <div>
                              <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>
                              <br>
                            </div>
                            <div>
                              <div> On 05/17/2013 02:34 PM, <a href="mailto:qasimakhan@gmail.com" target="_blank">qasimakhan@gmail.com</a>
                                wrote:
                                <blockquote type="cite">
                                  <div dir="ltr">
                                    <div>
                                      <div>Hi,<br>
                                        <br>
                                      </div>
                                      Please find attached trace. This
                                      is server on Public IP that is why
                                      i cannot send the trace on the
                                      list. I am listening to IP&#39;s as
                                      follows<br>
                                      <br>
                                      listen=udp:<a href="http://202.152.203.195:5060" target="_blank">202.152.203.195:5060</a><br>
                                      listen=udp:<a href="http://202.152.203.195:6000" target="_blank">202.152.203.195:6000</a><br>
                                      listen=udp:<a href="http://192.168.226.142:5060" target="_blank">192.168.226.142:5060</a><br>
                                      listen=udp:<a href="http://192.168.226.142:6000" target="_blank">192.168.226.142:6000</a><br>
                                      <br>
                                      disable_tcp=no<br>
                                      listen=tcp:<a href="http://202.152.203.195:5060" target="_blank">202.152.203.195:5060</a><br>
                                      listen=tcp:<a href="http://202.152.203.195:6000" target="_blank">202.152.203.195:6000</a><br>
                                      listen=tcp:<a href="http://192.168.226.142:5060" target="_blank">192.168.226.142:5060</a><br>
                                      listen=tcp:<a href="http://192.168.226.142:6000" target="_blank">192.168.226.142:6000</a><br>
                                      <br>
                                    </div>
                                    <div>If you need anything else i
                                      would be happy to provide it to
                                      you.<br>
                                    </div>
                                    <div><br>
                                    </div>
                                    Regards,<br>
                                    Qasim<br>
                                    <div><br>
                                    </div>
                                  </div>
                                  <div class="gmail_extra"><br>
                                    <br>
                                    <div class="gmail_quote">On Fri, May
                                      17, 2013 at 3:50 PM, 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:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                        <div text="#000000" bgcolor="#ffffff"> <tt>Hello
                                            Qasim,<br>
                                            <br>
                                            So you have multiple
                                            interfaces in OpenSIPS - are
                                            all of them the same
                                            protocol ?<br>
                                            <br>
                                            Please try to post a SIP
                                            capture of the full call, to
                                            see how the RR part is done.<br>
                                            <br>
                                            Regards,<br>
                                          </tt>
                                          <div>
                                            <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>
                                            <br>
                                          </div>
                                          <div>
                                            <div> On 05/16/2013 01:07
                                              PM, <a href="mailto:qasimakhan@gmail.com" target="_blank">qasimakhan@gmail.com</a>
                                              wrote:
                                              <blockquote type="cite">
                                                <div dir="ltr">On
                                                  further investigation
                                                  i see that i only face
                                                  this issue when both
                                                  caller and callee are
                                                  on the same network.
                                                  If both are on
                                                  separate network it
                                                  works fine.<br>
                                                  <br>
                                                  Regards,<br>
                                                  Qasim<br>
                                                </div>
                                                <div class="gmail_extra">
                                                  <br>
                                                  <br>
                                                  <div class="gmail_quote">On
                                                    Thu, May 16, 2013 at
                                                    3:05 PM, <a href="mailto:qasimakhan@gmail.com" target="_blank">qasimakhan@gmail.com</a>
                                                    <span dir="ltr">&lt;<a href="mailto:qasimakhan@gmail.com" target="_blank">qasimakhan@gmail.com</a>&gt;</span>
                                                    wrote:<br>
                                                    <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                                      <div dir="ltr">
                                                        <div>yes.<br>
                                                          <br>
                                                        </div>
                                                        Regards,<br>
                                                        Qasim<br>
                                                      </div>
                                                      <div>
                                                        <div>
                                                          <div class="gmail_extra">
                                                          <br>
                                                          <br>
                                                          <div class="gmail_quote">On

                                                          Thu, May 16,
                                                          2013 at 2:50
                                                          PM,
                                                          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:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                                          <div text="#000000" bgcolor="#ffffff"> <tt>And do you have UDP 202.152.203.195 port 6000 as
                                                          listener
                                                          defined in
                                                          OpenSIPS ??<br>
                                                          <br>
                                                          Regards,</tt>
                                                          <div><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>
                                                          <br>
                                                          </div>
                                                          <div>
                                                          <div> On
                                                          05/16/2013
                                                          12:32 PM, <a href="mailto:qasimakhan@gmail.com" target="_blank">qasimakhan@gmail.com</a>
                                                          wrote:
                                                          <blockquote type="cite">
                                                          <div dir="ltr">
                                                          <div>
                                                          <div>Hi
                                                          Bodgan,<br>
                                                          <br>
                                                          </div>
                                                          Yes i see the
                                                          following
                                                          route header
                                                          in my packet.<br>
                                                          <br>
                                                          Route: <a>&lt;sip:622190004002@202.152.203.195:6000;lr;ftag=3b710c25;did=e55.a77ff685&gt;</a><br>
                                                          <br>
                                                          <br>
                                                          </div>
                                                          <div>And yes i
                                                          am routing it
                                                          through
                                                          loose_route.<br>
                                                          <br>
                                                          </div>
                                                          <div>Regards,<br>
                                                          Qasim<br>
                                                          </div>
                                                          </div>
                                                          <div class="gmail_extra"><br>
                                                          <br>
                                                          <div class="gmail_quote">On


                                                          Wed, May 15,
                                                          2013 at 10:40
                                                          PM,
                                                          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:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                                          <div text="#000000" bgcolor="#ffffff"> <tt>Hello Qasim,<br>
                                                          <br>
                                                          The ACK should
                                                          be routed via
                                                          loose_route()
                                                          based on the
                                                          &quot;Route&quot;
                                                          headers from
                                                          it. Could you
                                                          check if the
                                                          Route hdrs
                                                          (from the ACK)
                                                          are correctly
                                                          reflecting
                                                          your opensips
                                                          interfaces ?<br>
                                                          <br>
                                                          Best 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> <br>
                                                          On 05/14/2013
                                                          07:55 AM, <a href="mailto:qasimakhan@gmail.com" target="_blank">qasimakhan@gmail.com</a>
                                                          wrote: </div>
                                                          </div>
                                                          <blockquote type="cite">
                                                          <div>
                                                          <div>
                                                          <div dir="ltr">
                                                          <div>
                                                          <div>Hi,<br>
                                                          <br>
                                                          </div>
                                                          I am using
                                                          OpenSIPs in
                                                          Public&lt;-&gt;Private
                                                          bridging mode
                                                          and have
                                                          enabled
                                                          mhomed=1. But
                                                          the problem is
                                                          that when we
                                                          have a call in
                                                          which both
                                                          parties are on
                                                          Public
                                                          interface the
                                                          INVITE gets
                                                          relayed
                                                          properly but
                                                          and ACK of
                                                          that invite
                                                          gives the
                                                          following
                                                          error.<br>
                                                          <br>
                                                          ERROR:core:get_out_socket:



                                                          no socket
                                                          found<br>
                                                          ERROR:core:forward_request:



                                                          cannot forward
                                                          to af 2, proto
                                                          1 no
                                                          correspondinglistening
                                                          socket<br>
                                                          <br>
                                                          </div>
                                                          Regards,<br>
                                                          Qasim<br>
                                                          </div>
                                                          </div>
                                                          </div>
                                                          <pre><fieldset></fieldset>
_______________________________________________
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>
                                                          </div>
                                                          </blockquote>
                                                          </div>
                                                          <br>
                                                          </div>
                                                          </blockquote>
                                                          </div>
                                                          </div>
                                                          </div>
                                                          </blockquote>
                                                          </div>
                                                          <br>
                                                          </div>
                                                        </div>
                                                      </div>
                                                    </blockquote>
                                                  </div>
                                                  <br>
                                                </div>
                                              </blockquote>
                                            </div>
                                          </div>
                                        </div>
                                      </blockquote>
                                    </div>
                                    <br>
                                  </div>
                                </blockquote>
                              </div>
                            </div>
                          </div>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                  </blockquote>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
  </div></div></div>

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