<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    On 7/19/11 12:10 PM, Max Doronin wrote:
    <blockquote
cite="mid:CAMDe8i+h0qNnLWLpqZGue96tkjr1XrU=AwfEDzEXq94jazt0cg@mail.gmail.com"
      type="cite">Hello Daniel,
      <div><br>
      </div>
      <div>I think your guess about failure_route is correct. Here is
        the related piece of config. Actually I can not find any
        append_branch() call in config (which is not originally
        developed by me).</div>
      <div><font class="Apple-style-span" face="'courier new',
          monospace"><br>
        </font></div>
      <div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">failure_route[1] {</font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">&nbsp; &nbsp; &nbsp; &nbsp; if (t_was_cancelled()) {</font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit;</font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">&nbsp; &nbsp; &nbsp; &nbsp; }</font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace"><br>
          </font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">&nbsp; &nbsp; &nbsp; &nbsp; if
            (t_check_status("408|403|404|488|480|415|50[0-4]")) {</font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (next_gw()) {</font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t_on_failure("1");</font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; route(6);</font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; route(6);</font></div>
      </div>
    </blockquote>
    you should not call route(6) in the above line, but rather exit --
    there was no next gw to try.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <blockquote
cite="mid:CAMDe8i+h0qNnLWLpqZGue96tkjr1XrU=AwfEDzEXq94jazt0cg@mail.gmail.com"
      type="cite">
      <div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">&nbsp; &nbsp; &nbsp; &nbsp; }</font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">}</font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace"><br>
          </font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">route[6] {</font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">&nbsp; &nbsp; &nbsp; &nbsp; if (!t_relay()) {</font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sl_reply_error();</font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">&nbsp; &nbsp; &nbsp; &nbsp; }</font></div>
        <div>
          <font class="Apple-style-span" face="'courier new', monospace">&nbsp;
            &nbsp; &nbsp; &nbsp; exit;</font></div>
        <div><font class="Apple-style-span" face="'courier new',
            monospace">}</font></div>
        <div><br>
        </div>
      </div>
      <div>Cheers,</div>
      <div>Max.</div>
      <div><br>
        <div class="gmail_quote">On Tue, Jul 19, 2011 at 3:37 PM,
          Daniel-Constantin Mierla <span dir="ltr">&lt;<a
              moz-do-not-send="true" href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex;">
            Hello,
            <div>
              <div class="h5"><br>
                <br>
                On 7/13/11 5:51 PM, Max Doronin wrote:<br>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  Hello guys,<br>
                  <br>
                  I have strange behavior on my Kamailio-1.5.1-notls
                  instance.<br>
                  <br>
                  I have LCR and TM modules enabled.For a particular
                  destination I have<br>
                  4 routes to try. When I call to non-existing number,
                  it tries<br>
                  - route 1 (404 Not Found)<br>
                  - route 2 (404 Not Found)<br>
                  - route 3 (503 Service unavailable)<br>
                  <br>
                  And the problem is with the last 503.<br>
                  <br>
                  Kamailio ACKs it, immediately drops these 2 lines into
                  syslog<br>
                  Jul 13 04:14:47 /usr/local/sbin/kamailio[23572]:<br>
                  ERROR:tm:t_forward_nonack: no branch for forwarding<br>
                  Jul 13 04:14:47 /usr/local/sbin/kamailio[23572]:
                  ERROR:tm:w_t_relay:<br>
                  t_forward_nonack failed<br>
                  And sends<br>
                  SIP/2.0 500 Server error occurred (19/SL).<br>
                  To the call originator.<br>
                  <br>
                  30 microseconds later it sends<br>
                  SIP/2.0 500 Service Unavailable.<br>
                  to the originator again<br>
                  <br>
                  Latter 500 looks like the relayed original "503
                  Service unavailable".<br>
                  I think so because the Reason header is the same:<br>
                  Reason: SIP;cause=503;text="Service<br>
                  Unavailable";icodetext="NoCircuitAvailable";iintcode=10034;isubsystem=3.<br>
                  <br>
                  Obviously call is terminated.<br>
                  <br>
                  I noticed that that last peer rewrites my Via headers
                  like this:<br>
                  Original:<br>
                  ==<br>
                  Via: SIP/2.0/UDP 187.45.214.132;branch=z9hG4bK3dac.fae9b793.2.<br>
                  Via: SIP/2.0/UDP<br>
                  192.168.2.33:5622;received=49.49.59.23;branch=z9hG4bK-d8754z-a6ba40014f97fb7c-1---d8754z-;rport=23832.<br>
                  ==<br>
                  <br>
                  Rewritten<br>
                  ==<br>
                  Via: SIP/2.0/UDP<br>
                  187.45.214.132;received=187.45.214.132;branch=z9hG4bK3dac.fae9b793.2,SIP/2.0/UDP<br>
                  192.168.2.33:5622;received=49.49.59.23;branch=z9hG4b<br>
                  ==<br>
                  <br>
                  I tried to modify via1_matching parameter (1 -&gt; &nbsp;0)
                  but no changes.<br>
                  <br>
                  My questions are:<br>
                  - What can be the reason of that 500 with 19/SL<br>
                  - Can kamailio properly handle this 1 line Via header?<br>
                  - What can be the reason of that "t_forward_nonack: no
                  branch for forwarding"?<br>
                </blockquote>
                <br>
              </div>
            </div>
            it seems you try to forward one more time, but there is no
            new branch where to send. I guess there is some issue in the
            failure_route, like calling t_relay() even if the new branch
            is not added. If you can paste it here, I can tell more
            clear if something is wrong there.<br>
            <br>
            Cheers,<br>
            Daniel<br>
            <font color="#888888">
              <br>
              -- <br>
              Daniel-Constantin Mierla -- <a moz-do-not-send="true"
                href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
              Kamailio Advanced Training, Oct 10-13, Berlin: <a
                moz-do-not-send="true" href="http://asipto.com/u/kat"
                target="_blank">http://asipto.com/u/kat</a><br>
              <a moz-do-not-send="true"
                href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a>
              -- <a moz-do-not-send="true"
                href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a><br>
              <br>
            </font></blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Kamailio Advanced Training, Oct 10-13, Berlin: <a class="moz-txt-link-freetext" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
  </body>
</html>