<div><br></div><div>Hi Bogdan,</div><div>      When I do serialize_branches(1) after look up , I can see both the contacts in logs with proper PATH values (<b><a href="http://50.16.212.126:8060">50.16.212.126:8060</a></b>).</div>
<div>But It process 1st contact properly but after next_branches() it does not process 2nd branch properly . It does not add <b>50.16.212.126:8060;lr </b>as route.</div><div><br></div><div><div>Jun  8 11:39:55 ip-10-122-214-174 /usr/local/sbin/opensips[18491]: DBG:core:<b>serialize_branches: Msg information &lt;sip:855_1_7agentsURI@115.252.66.182:3912;transport=TCP,sip:50.16.212.126:8060;lr,&lt;sip:50.16.212.126:8060;lr&gt;,-1,0&gt;</b></div>
<div>Jun  8 11:39:55 ip-10-122-214-174 /usr/local/sbin/opensips[18490]: DBG:core:parse_headers: via found, flags=2</div><div>Jun  8 11:39:55 ip-10-122-214-174 /usr/local/sbin/opensips[18491]: DBG:core:<b>serialize_branches: Branch information &lt;sip:855_1_7agentsURI@122.177.144.180:2043;transport=TCP,sip:50.16.212.126:8060;lr,&lt;sip:50.16.212.126:8060;lr&gt;,-1,0&gt;</b></div>
<div>Jun  8 11:39:55 ip-10-122-214-174 /usr/local/sbin/opensips[18490]: DBG:core:parse_headers: this is the first via</div></div><div><br></div><div><br></div>Thanx,<div>Gomtesh<br><br><div class="gmail_quote">On Mon, Jun 11, 2012 at 3:34 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 bgcolor="#ffffff" text="#000000">
    Hi Gomtesh,<br>
    <br>
    Do your saved contacts contain a PATH field at all ? check with
    &quot;opensipsctl ul show&quot; to see if the path was stored in usrloc cache.<br>
    <br>
    Maybe your problem is not at &quot;lookup&quot; time, but rather at &quot;save&quot;
    time.<br>
    <br>
    Regards,<br>
    Bogdan<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><div class="h5">
    <br>
    On 06/11/2012 10:56 AM, Gomtesh Jain wrote:<br>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div class="gmail_quote">Hi ,
        <div>   I am using opensips 1.6 . I am facing an issue here . It
          seems In faliure route when I do next_branches() it does not
          set value of &quot;path&quot; (from lookup) as distination/route . Which
          results , opensips try to send message directly to UA . </div>
        <div>  </div>
        <div>Here I give N/w diagram </div>
        <div><br>
        </div>
        <div>  UA1(115.X.X.X)-------[PROXY]--------|                    
                        |</div>
        <div>                                                          |
          Registrar/Opensips   |</div>
        <div>  UA2 (122.x.x.x)--------[PROXY]-------|                  
                          |</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>The issue I am facing is ...</div>
        <div>1. On any INVITE to Opensips after lookup Opensips sends
          invite to Proxy </div>
        <div>2. On any faliure response in &quot;Faiure Route&quot;</div>
        <div>3. When I do next_branches() it tries to send INVITE
          directly to 122.X.X.X .</div>
        <div><br>
        </div>
        <div>-----------------HERE I GIVE PIECE OF
          Opnesips.cfg--------------------</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>
          <div>       xlog(&quot;L_NOTICE&quot;, &quot;SERIALIZE BRANCHES ($rm) r-uri
            ($ru) : Contact : $ct  :callID $ci : CSeq $cs \n&quot;);</div>
          <div>                        if (!serialize_branches(1)){</div>
          <div>                               
            sl_send_reply(&quot;500&quot;,&quot;Unable to load contacts&quot;);</div>
          <div>                                exit;</div>
          <div>                        }else{</div>
          <div>                      xlog(&quot;L_NOTICE&quot;, &quot;PREPARE FIRST
            BRANCH ($rm) r-uri ($ru) : Contact : $ct  :callID $ci : CSeq
            $cs \n&quot;);</div>
          <div>                                if (next_branches()){</div>
          <div>                                    xlog(&quot;L_NOTICE&quot;,
            &quot;NEXT BRANCH After Seri :callID $ci : CSeq $cs \n&quot;);</div>
          <div>                                       
            t_on_failure(&quot;1&quot;);</div>
          <div>                                }</div>
          <div>                                #else{</div>
          <div>                                #      
            sl_send_reply(&quot;504&quot;,&quot;Not found &quot;);</div>
          <div>                                #       exit;</div>
          <div>                                #}</div>
          <div>                        }</div>
          <div>                        append_hf(&quot;P-hint: lcr
            applied\r\n&quot;);</div>
          <div><br>
          </div>
          <div>                }else{</div>
          <div>                        append_hf(&quot;P-hint: usrloc
            applied\r\n&quot;);</div>
          <div>                }</div>
          <div><br>
          </div>
          <div>        };</div>
          <div><br>
          </div>
          <div>        route(1);</div>
          <div>}</div>
        </div>
        <div><br>
        </div>
        <div>
          <div>route[1] {</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>        if (nat_uac_test(&quot;7&quot;)) {</div>
          <div>            fix_nated_contact();</div>
          <div>        };</div>
          <div>        # send it out now; use stateful forwarding as it
            works reliably</div>
          <div>        # even for UDP2TCP</div>
          <div>        xlog(&quot;L_NOTICE&quot;, &quot; IN ROUTE BLOCK method ($rm)
            r-uri ($rs) :callID $ci \n&quot;);</div>
          <div>        if (!t_relay()) {</div>
          <div>                sl_reply_error();</div>
          <div>        };</div>
          <div>        t_on_reply(&quot;1&quot;);</div>
          <div>        exit;</div>
          <div>}</div>
          <div><br>
          </div>
          <div>onreply_route[1]{</div>
          <div>  xlog(&quot;L_NOTICE&quot;, &quot; ON REPLY BLOCK  method ($rm) r-uri
            ($rs) :callID $ci :CSeq $cs \n&quot;);</div>
          <div>}</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>failure_route[1] {</div>
          <div>   if ( t_check_status(&quot;404|477|408|486|50[234]&quot;)){</div>
          <div>                xlog(&quot;L_NOTICE&quot;, &quot; ERROR RESPONSE MATCHED
             method ($rm) r-uri ($rs) :callID $ci :CSeq $cs \n&quot;);</div>
          <div>         if (next_branches())</div>
          <div>         {</div>
          <div>                xlog(&quot;L_NOTICE&quot;, &quot; ON FAILURE BLOCK
             method ($rm) r-uri ($rs) :callID $ci :CSeq $cs \n&quot;);</div>
          <div>                t_on_failure(&quot;1&quot;);</div>
          <div>                route(1);</div>
          <div><br>
          </div>
          <div>         }</div>
          <div><br>
          </div>
          <div>    }</div>
          <div>}</div>
        </div>
        <div><br>
        </div>
        <div>-----------------------------------------------------------------------------</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>I attach the log of the call in debug=9 mode.</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Please have a look at this if anyone can help me .</div>
        <div><br>
        </div>
        <div>Thanx,</div>
        <div>Gomtesh</div>
        <div><br>
        </div>
      </div>
      <br>
      </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>