<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div class="" style="">Hi Bogdan,</div><div class="" style=""><br class="" style=""></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;">Thanks for the response. I have edited the script as you have mentioned but I  have the same problem: </div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;">401 message going to .3  is not passed by .141(opensips lb)</div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica,
 Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><br class="" style=""></div><div class="" style="background-color: transparent;">        else if (is_method("REGISTER")) {</div><div class="" style="background-color: transparent;">                xlog("xlog_initialregister");</div><div class="" style="background-color: transparent;">                if($si=="192.168.2.11") {</div><div class="" style="background-color: transparent;">                <span style="background-color: transparent;" class="">$du = "sip:192.168.2.3:4060";</span></div><div class="" style="background-color: transparent;">                append_branch();</div><div class="" style="background-color: transparent;">             
   $du = "sip:192.168.2.5:4060";</div><div class="" style="background-color: transparent;">                t_relay();</div><div class="" style="background-color: transparent;">            <span style="background-color: transparent;" class="">    exit;</span></div><div class="" style="background-color: transparent;">                }</div><div class="" style="background-color: transparent;">        if (!t_relay()) {</div><div class="" style="background-color: transparent;">                xlog("xlog_route1error");</div><div class="" style="background-color: transparent;">                sl_reply_error();</div><div class="" style="background-color: transparent;">        };</div><div class="" style=""><br
 class="" style=""></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><br class="" style=""></div><div class="" style="background-color: transparent;">No.     Time        Source                Destination           Protocol Info</div><div class="" style="background-color: transparent;">     57 13.772015   192.168.2.11          192.168.2.141         SIP      Request: REGISTER sip:open-ims.test</div><div class="" style="background-color: transparent;">     58 13.774094   192.168.2.141         192.168.2.5           SIP      Request: REGISTER
 sip:open-ims.test</div><div class="" style="background-color: transparent;">     59 13.774097   192.168.2.141         192.168.2.3           SIP      Request: REGISTER sip:open-ims.test</div><div class="" style="background-color: transparent;">     60 13.890456   192.168.2.3           192.168.2.141         SIP      Status: 401 Unauthorized - Challenging the UE    (0 bindings)</div><div class="" style="background-color: transparent;">     61 14.046746   192.168.2.5           192.168.2.141         SIP      Status: 401 Unauthorized - Challenging the UE    (0 bindings)</div><div class="" style="background-color: transparent;">     62 14.047052   192.168.2.141      
   192.168.2.11          SIP      Status: 401 Unauthorized - Challenging the UE    (0 bindings)</div><div class="" style="background-color: transparent;">     63 14.047538   192.168.2.11          192.168.2.141         SIP      Request: REGISTER sip:open-ims.test</div><div class="" style="background-color: transparent;">     64 14.047887   192.168.2.141         192.168.2.5           SIP      Request: REGISTER sip:open-ims.test</div><div class="" style="background-color: transparent;">     65 14.047947   192.168.2.141         192.168.2.3           SIP      Request: REGISTER sip:open-ims.test</div><div class="" style="background-color: transparent;">   
  66 14.084120   192.168.2.3           192.168.2.141         SIP      Status: 401 Unauthorized - Challenging the UE    (0 bindings)</div><div class="" style="background-color: transparent;">     67 14.112597   192.168.2.5           192.168.2.141         SIP      Status: 200 OK - SAR succesful and registrar saved    (1 bindings)</div><div class="" style="background-color: transparent;">     68 14.112755   192.168.2.141         192.168.2.11          SIP      Status: 200 OK - SAR succesful and registrar saved    (1 bindings)</div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;
 background-color: transparent;"><br class="" style=""></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><br></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><br></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;">Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: xlog method: [REGISTER] totag: [<null>] sipid: [192.168.2.11] messageid:  [1] callid:  [1-3096@192.168.2.11] callsequence: [2]</div><div class="" style="">Oct 13 12:42:21 ubuntu
 /usr/local/opensips/sbin/opensips[4626]: DBG:uri:has_totag: no totag</div><div class="" style="">Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: xlog_initialregister</div><div class="" style="">Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: DBG:core:comp_scriptvar: str 20 : 192.168.2.11</div><div class="" style="">Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: DBG:tm:t_newtran: transaction on entrance=0xffffffffffffffff</div><div class="" style="">Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: DBG:core:parse_headers: flags=ffffffffffffffff</div><div class="" style="">Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: DBG:core:get_hdr_field: content_length=0</div><div class="" style="">Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: DBG:core:get_hdr_field: found end of header</div><div class="" style="">Oct 13 12:42:21 ubuntu
 /usr/local/opensips/sbin/opensips[4626]: DBG:core:parse_headers: flags=78</div><div class="" style="">Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: DBG:tm:t_lookup_request: start searching: hash=23653, isACK=0</div><div class="" style="">Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: DBG:tm:matching_3261: RFC3261 transaction matching failed</div><div class="" style="">Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: DBG:tm:t_lookup_request: no transaction found</div><div class="" style="">Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: DBG:tm:run_reqin_callbacks: trans=0x7fc6d2b0d9e8, callback type 1, id 1 entered</div><div class="" style="">Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: DBG:tm:run_reqin_callbacks: trans=0x7fc6d2b0d9e8, callback type 1, id 0 entered</div><div class="" style=""><span class="" style=""></span></div><div class="" style="">Oct 13 12:42:21
 ubuntu /usr/local/opensips/sbin/opensips[4626]: DBG:core:_shm_resize: resize(0) called</div><div class="" style=""><br class="" style=""></div><div class="" style=""><br class="" style=""></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;">Kind regardsi</div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;">Kaan</div>  <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" class=""> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" class=""> <div dir="ltr" class="" style=""> <hr size="1" class="" style="">  <font
 size="2" face="Arial" class="" style=""> <b class="" style=""><span style="font-weight:bold;" class="">From:</span></b> Bogdan-Andrei Iancu <bogdan@opensips.org><br class="" style=""> <b class="" style=""><span style="font-weight: bold;" class="">To:</span></b> Kaan Dandin <kaandandin@yahoo.com>; OpenSIPS users mailling list <users@lists.opensips.org> <br class="" style=""><b class="" style=""><span style="font-weight: bold;" class="">Cc:</span></b> Gunes Kurt <gkurt@itu.edu.tr>; "Ibrahim Hokelek, (BİLGEM-UEKAE)" <ibrahim.hokelek@tubitak.gov.tr> <br class="" style=""> <b class="" style=""><span style="font-weight: bold;" class="">Sent:</span></b> Monday, October 13, 2014 8:05 PM<br class="" style=""> <b class="" style=""><span style="font-weight: bold;" class="">Subject:</span></b> Re: YNT: Re: YNT: Re: YNT: Re: [OpenSIPS-Users] RFC3261 transaction matching failed error for the second 401 Unauthorized - Challenging the
 UE<br class="" style=""> </font> </div> <div class="" style=""><br class="" style=""><div id="yiv0192417079" class="" style=""><div class="" style="">
    <div class="" style=""><tt class="" style="">Hi Kaan,</tt><tt class="" style=""><br clear="none" class="" style="">
      </tt><tt class="" style=""><br clear="none" class="" style="">
      </tt><tt class="" style="">That is completely wrong as you break the transaction
        logic. The correct way of doing par</tt><tt class="" style="">allel forking is :</tt><tt class="" style=""><br clear="none" class="" style="">
      </tt><tt class="" style="">    </tt><tt class="" style=""><br clear="none" class="" style="">
      </tt><tt class="" style="">  if($si=="192.168.2.11") {</tt><tt class="" style=""><br clear="none" class="" style="">
      </tt><tt class="" style="">    $du = "sip:</tt><tt class="" style=""><span class="" style="background-color:transparent;">192.168.2.3:4060";<br clear="none" class="" style="">
              append_branch();  # add first destination with the above
          value<br clear="none" class="" style="">
              $du = </span></tt><tt class="" style="">"sip:</tt><span class="" style="background-color:transparent;"><tt class="" style="">192.168.2.5:4060";</tt><tt class="" style=""><br clear="none" class="" style="">
        </tt><tt class="" style="">    t_relay();</tt><tt class="" style=""><br clear="none" class="" style="">
        </tt><tt class="" style="">  }</tt><tt class="" style=""><br clear="none" class="" style="">
        </tt><tt class="" style=""><br clear="none" class="" style="">
        </tt><tt class="" style="">Regards,</tt><br clear="none" class="" style="">
      </span>
      <pre class="" style="">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a rel="nofollow" shape="rect" class="" target="_blank" href="http://www.opensips-solutions.com/" style="">http://www.opensips-solutions.com</a></pre></div></div></div><br class="" style=""></div> </div> </div>  </div></body></html>