Hi Bogdan,<br>    I put some more log messages...and found that if there are 2 routes in INVITE  It execute <br><br><font size="1">if (loose_route()) {<br>
                # mark routing logic in request<br>
            xlog(&quot;L_NOTICE&quot;, &quot;HERE OPENSIP CONF Loose Route method ($rm) \n&quot;);<br>
                route(1);<br>
                exit;<br>
        };</font><br>piece of script and exit.<br><br>while In case of 1 route this piece of script  does not execute.<br><br>Here I give you part of script ....<br><br><br><font size="1">route{<br>        # max_forwards==0, or excessively long requests<br>
            xlog(&quot;L_NOTICE&quot;, &quot;HERE OPENSIP CONF STARTS method ($rm) \n&quot;);<br>        if (!mf_process_maxfwd_header(&quot;10&quot;)) {<br>                sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);<br>
                exit;<br>        };<br><br>        if (msg:len &gt;=  2048 ) {<br>                sl_send_reply(&quot;513&quot;, &quot;Message too big&quot;);<br>                exit;<br>        };<br><br>        if (nat_uac_test(&quot;1&quot;)) {<br>
            fix_nated_contact();<br>        };<br>        # subsequent messages withing a dialog should take the<br>        # path determined by record-routing<br>        if (loose_route()) {<br>                # mark routing logic in request<br>
            xlog(&quot;L_NOTICE&quot;, &quot;HERE OPENSIP CONF Loose Route method ($rm) \n&quot;);<br>                route(1);<br>                exit;<br>        };<br><br>        if (!((to_uri=~&quot;@<a href="http://208.109.191.123">208.109.191.123</a>&quot;)||(to_uri=~&quot;@.+<a href="http://3clogic.com">3clogic.com</a>&quot;)||(src_ip==50.16.212.126)))<br>
        {<br>            sl_send_reply(&quot;403&quot;, &quot;Relaying not allowed&quot;);<br>            exit;<br><br>        }<br>        # we record-route all messages -- to make sure that<br>        # subsequent messages will go through our proxy; that&#39;s<br>
        # particularly good if upstream and downstream entities<br>        # use different transport protocol<br><br>        if (!method==&quot;REGISTER&quot;)<br>        {<br>            xlog(&quot;L_NOTICE&quot;, &quot;Before Add Record Route TCP OPENSIPS \n&quot;);<br>
            record_route();<br>            xlog(&quot;L_NOTICE&quot;, &quot;Add Record Route TCP OPENSIPS \n&quot;);<br>       }<br><br><br>Thanx,<br>Gomtesh<br></font><br><div class="gmail_quote">On Thu, Aug 16, 2012 at 7:37 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">
    <tt>Well, that means your script execution does not get there....try
      to place more xlogs in the beginning of the script to see what&#39;s
      the exec path in there.<br>
      <br>
      Regards,<br>
      Bogdan<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 08/16/2012 01:58 PM, Gomtesh Jain wrote:
    <blockquote type="cite">Hi Bogdan,<br>
          I put 2 log messages before and after record_route to make
      sure it gets executed.<br>
      But I dont&#39;s see those messages in log  1st scenario (2 route
      headers) while I can see both the message in log in 2nd scenario
      (1 route header).<br>
      <br>
      Here I give INVITE messages in 1st scenario...<br>
      <br>
      <font size="1"><br>
      </font><font><font size="1">INVITE <a href="http://sip:aa1@management.3clogic.com:5506" target="_blank">sip:aa1@management.3clogic.com:5506</a>
          SIP/2.0<br>
          Via: SIP/2.0/TCP
192.168.3.134:1323;rport;branch=z9hG4bKPj564512b7c47d4f1c91bf69b2616eea18<br>
          Max-Forwards: 70<br>
          From:
          <a>sip:aa1@management.3clogic.com:5506;tag=9fa0b4f78ee640dba4c6e0522c9c63a8</a><br>
          To: <a href="http://sip:aa1@management.3clogic.com:5506" target="_blank">sip:aa1@management.3clogic.com:5506</a><br>
          Contact: <a>&lt;sip:aa1@192.168.3.134:1321;transport=TCP;ob&gt;</a><br>
          Call-ID: 8ba1014b656e4cdc968bcf4a9c92ae66<br>
          CSeq: 3514 INVITE<br>
          <b>Route: <a>&lt;sip:23.20.79.160:7060;transport=TCP;lr&gt;</a><br>
            Route: <a>&lt;sip:208.109.191.105:8060;lr&gt;</a></b><br>
          Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE,
          NOTIFY, REFER, MESSAGE, OPTIONS<br>
          Supported: replaces, 100rel, timer, norefersub<br>
          Session-Expires: 300<br>
          Min-SE: 90<br>
          User-Agent: WebAstra<br>
          X-Info: normal;;P=;L=;S=Out;A=aa1;CI=;CS=1;PI=1;CP=1<br>
          Content-Type: application/sdp<br>
          Content-Length:   259</font><br>
      </font><br>
      TCP Proxy fwds ...<br>
      <font size="1"><br>
        INVITE <a href="http://sip:aa1@management.3clogic.com:5506" target="_blank">sip:aa1@management.3clogic.com:5506</a>
        SIP/2.0<br>
        Via: SIP/2.0/UDP
        23.20.79.160:7060;branch=z9hG4bK9618.b76ba1d3.0;i=fe<br>
        Via: SIP/2.0/TCP
192.168.3.134:1323;received=115.252.66.182;rport=1323;branch=z9hG4bKPj564512b7c47d4f1c91bf69b2616eea18<br>
        Max-Forwards: 69<br>
        From:
        <a>sip:aa1@management.3clogic.com:5506;tag=9fa0b4f78ee640dba4c6e0522c9c63a8</a><br>
        To: <a href="http://sip:aa1@management.3clogic.com:5506" target="_blank">sip:aa1@management.3clogic.com:5506</a><br>
        Contact: <a>&lt;sip:aa1@115.252.66.182:1323;transport=TCP;ob&gt;</a><br>
        Call-ID: 8ba1014b656e4cdc968bcf4a9c92ae66<br>
        CSeq: 3514 INVITE<br>
        Route: <a>&lt;sip:208.109.191.105:8060;lr&gt;</a><br>
        Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE,
        NOTIFY, REFER, MESSAGE, OPTIONS<br>
        Supported: replaces, 100rel, timer, norefersub<br>
        Session-Expires: 300<br>
        Min-SE: 90<br>
        User-Agent: WebAstra<br>
        X-Info: normal;;P=;L=;S=Out;A=aa1;CI=;CS=1;PI=1;CP=1<br>
        Content-Type: application/sdp<br>
        Content-Length:   25</font><br>
      <br>
      <br>
      Thanx,<br>
      Gomtesh<br>
      <br>
      <br>
      <div class="gmail_quote">On Thu, Aug 16, 2012 at 4:05 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 bgcolor="#ffffff" text="#000000"> <tt>You say you do
              record_route(), but no RR header is added to the request ?
              this is a bit hard to believe ....are you sure your script
              ends to the RR function ?<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> <br>
                On 08/16/2012 01:23 PM, Gomtesh Jain wrote:
                <blockquote type="cite">Hi Bogdan,<br>
                     I am doing ...<br>
                  <br>
                   if (!method==&quot;REGISTER&quot;)<br>
                          {<br>
                              xlog(&quot;L_NOTICE&quot;, &quot;Before Add Record Route
                  TCP OPENSIPS \n&quot;);<br>
                              record_route();<br>
                              xlog(&quot;L_NOTICE&quot;, &quot;Add Record Route TCP
                  OPENSIPS \n&quot;);<br>
                           }<br>
                  <br>
                  in my config .<br>
                  <br>
                  <br>
                  But in 1st scenario it does not add record route .So
                  UA1 tries to send ACK directly to &quot;Other proxy&quot;. Which
                  is wrong.<br>
                  <br>
                  <br>
                   While it adds record route in 2nd scenario and all
                  signalling works fine.<br>
                  <br>
                  <br>
                  Thanx,<br>
                  Gomtesh<br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <div class="gmail_quote">On Thu, Aug 16, 2012 at 3:43
                    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">Hi Gomtesh,
                      <div><br>
                        <br>
                        On 08/14/2012 04:10 PM, Gomtesh Jain wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> Hi,<br>
                          <br>
                            I am running opensips 1.6 as TCP proxy. I am
                          facing problem when I use multiple proxy in my
                          N/w.<br>
                          <br>
                            UA1------&gt; TCP proxy(opensips
                          1.6)-------&gt;Other Proxy--------&gt; UA2<br>
                          <br>
                          UA1 adds 2 Route headers in INVITE.<br>
                          In this scenario TCP proxy does not add Record
                          Route in INVITE.<br>
                        </blockquote>
                      </div>
                      How comes ?? don;t you do record_route() on the
                      opensips ??
                      <div><br>
                        <br>
                        <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br>
                          <br>
                          <br>
                          UA1------&gt; TCP proxy(opensips
                          1.6)------------&gt; UA2<br>
                          <br>
                          UA1 add only 1 Route header.<br>
                          In this scenario It works fine with the same
                          conf.<br>
                        </blockquote>
                      </div>
                      What &quot;fine&quot; means ? It means opensips adds on
                      route  ? or ?<br>
                      <br>
                      Regards,<br>
                      Bogdan<br>
                    </blockquote>
                  </div>
                  <br>
                </blockquote>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
    </blockquote>
  </div></div></div>

</blockquote></div><br>