<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Ravinder,<br>
      <br>
      As per the trace, the ACK is properly routed (frames 17 & 18).
      Also the incoming BYE (frame 19) is forwarded after a long time
      (see frame 22), still there is a funny 501 reply for BYE (before
      the relay) in frame 21.<br>
      <br>
      Could you also post somewhere the OpenSIPS logs (level 4, debug)
      corresponding to processing the incoming BYE (from 19) ?<br>
      <br>
      Best regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
</pre>
    <div class="moz-cite-prefix">On 10/18/2017 11:21 AM, Ravindrakumar
      Bhatt wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAN0RySr01y66v83e-ZND2cj0hxQ6LnTWddPmvbBSnX2TUrVY+Q@mail.gmail.com">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>Hi Bogdan,<br>
                </div>
                please find my opensips call log as requested:<br>
                <a href="https://pastebin.com/7ypH0z0x"
                  moz-do-not-send="true">https://pastebin.com/7ypH0z0x</a><br>
                <br>
              </div>
              as well as pcap for same call is attached with mail.<br>
            </div>
            PFA<br>
            <br>
          </div>
          Thanks and regards,<br>
        </div>
        Ravindra Bhatt<br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Oct 18, 2017 at 12:52 PM,
          Bogdan-Andrei Iancu <span dir="ltr"><<a
              href="mailto:bogdan@opensips.org" target="_blank"
              moz-do-not-send="true">bogdan@opensips.org</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> <tt>Hi Ravindra,<br>
                <br>
                Please post a link to the SIP trace/capture showing the
                entire SIP call (INVITE + 200 OK + ACK + BYE). The trace
                must cover all in and out traffic in OpenSIPS.<br>
                <br>
                Regards,<br>
              </tt>
              <pre class="m_8476486913152341497moz-signature" cols="72">Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  <a class="m_8476486913152341497moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.<wbr>com</a>
</pre>
              <div>
                <div class="h5">
                  <div class="m_8476486913152341497moz-cite-prefix">On
                    10/17/2017 12:29 PM, Ravindrakumar Bhatt wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="h5">
                    <div dir="ltr">
                      <div>
                        <div>Hello,<br>
                          i am using opensips v2.2.1 as SBC.<br>
                          call flow is like
                          caller->opensips->server-><wbr>opensips->callie.call
                          is established successfully but when BYE is
                          sent by any user it is not recognised by
                          topology_hiding_match() also i am not getting
                          any dialog related values(DLG_status,DLG_did
                          etc) in ACK or BYE method.<br>
                          <br>
                          here is my logic for  requset handling :<br>
                          <br>
                          route[PROCESS_INVITE] {<br>
                          <br>
                                  route("SETCDR");<br>
                                  if(t_check_trans()) {<br>
                                          drop();<br>
                                  }<br>
                                  route("CHECK_NAT");<br>
                                  create_dialog();<br>
                                  do_accounting("aaa","cdr|<wbr>failed");<br>
                                  route("REALY_ROUTE");<br>
                                  exit;<br>
                          }<br>
                          <br>
                          route[RELAY_ROUTE] {<br>
                                  if(is_method("INVITE|UPDATE")) {<br>
                                  xlog("L_INFO","CI:$ci In Relay Route
                          RU:$ru DU:$du Tu:$tu TU:$tU CT:$ct\n");<br>
                                          if(!has_totag() &&
                          is_method("INVITE") && !isflagset(15))
                          {<br>
                                                  xlog("L_INFO","CI:$ci
                          Topology_Hiding Call\n");<br>
                                                  setflag(15);<br>
                                                  topology_hiding("UC");<br>
                          #                       record_route();<br>
                          <br>
                          <br>
                                          }<br>
                                          if($avp(use-rtpproxy)=="YES")
                          {                 <br>
                                                 
                          route(PROCESS_RTPPROXY_OFFER);<br>
                                          }<br>
                                          xlog("L_INFO","CI:$ci Routing
                          Call IP:$avp(dest-ip)
                          PORT:$avp(dest-port)\n");<br>
                          <br>
                                          $avp(call_status)="Failed";<br>
                                          t_on_branch("DEFAULT_BRANCH_<wbr>ROUTE");<br>
                                          t_on_reply("DEFAULT_REPLY_<wbr>ROUTE");<br>
                                  }<br>
                          <br>
                                          xlog("L_INFO","DAILOG
                          STATUS::::  $DLG_end_reason $DLG_did     
                          $DLG_status $DLG_count\n");<br>
                          <br>
                          #       record_route();<br>
                                  if (!t_relay()) {<br>
                                          sl_reply_error();<br>
                                  }<br>
                                  exit;<br>
                          }<br>
                          <br>
                          route[MATCH_DIALOG] {<br>
                          <br>
                                  xlog("L_INFO",":::::DAILOG STATUS::::
                          $rm: $DLG_end_reason $DLG_did     $DLG_status
                          $DLG_count\n"); #HERE I AM GETTING most values
                          null <br>
                                  if(has_totag() &&
                          is_method("INVITE|ACK|BYE|<wbr>UPDATE|REFER|PRACK|INFO")
                          ) {<br>
                                          xlog("L_INFO","INSIDE
                          MATCH_DIALOG :::: $rm\n");<br>
                          #               loose_route();  <br>
                                          xlog(" found match request to
                          a dialog \n");<br>
                                          if(topology_hiding_match())
                          {                    #THIS CONDITIONS FAILS
                          FOR ALL REQUESTS<br>
                                                  if(is_method("BYE")) {<br>
                                                        <wbr> 
                          rtpproxy_unforce();<br>
                                                  }<br>
                                                  route("RELAY_ROUTE");<br>
                                          }<br>
                                  }<br>
                          }<br>
                          <br>
                          what is going wrong here ? is there any way to
                          handle this issue?<br>
                          <br>
                        </div>
                        Thanks and  regards ,<br>
                      </div>
                      Ravindra Bhatt<br>
                    </div>
                    <br>
                    <fieldset
                      class="m_8476486913152341497mimeAttachmentHeader"></fieldset>
                    <br>
                  </div>
                </div>
                <pre>______________________________<wbr>_________________
Users mailing list
<a class="m_8476486913152341497moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a class="m_8476486913152341497moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
              </blockquote>
              <br>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>