<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    I was not really able to understand the issue you write about ...<br>
    <br>
    Anyhow, any sip reply triggers the repply_route or onreply_route[x]
    that was set for transaction. After those routes are executed, the
    failure_route[z] can be also executed if the reply code is >=300
    and the failure route was set for transaction.<br>
    <br>
    In [on]reply_route you get access to the structure of the
    corresponding SIP response, while in failure_route you get access to
    the request that created the transaction.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 01/07/15 00:31, Yuriy Gorlichenko
      wrote:<br>
    </div>
    <blockquote
cite="mid:CABSP_VcR0MXdF-b-sZt25PXYvDBJb7Log1MDCfVUmaFjNe5wPw@mail.gmail.com"
      type="cite">
      <div dir="ltr">At my confiig I have route like this<br>
        <br>
        <div>onreply_route[REPLY_FROM_WS] {</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><span class="" style="white-space:pre"> </span>if(status=~"[12][0-9][0-9]")
          {</div>
        <div><span class="" style="white-space:pre"> </span>xlog("L_INFO",
          "Manage_Reply from webrtc client {$si:$sp} for method {$rm}:
          $rs");</div>
        <div><span class="" style="white-space:pre"> </span>rtpengine_manage("force
          trust-address replace-origin replace-session-connection
          DTLS=passive ICE=remove RTP/AVP");</div>
        <div><span class="" style="white-space:pre"> </span>route(NATMANAGE);</div>
        <div><span class="" style="white-space:pre"> </span>}<br>
           }<br>
          <br>
          This route successfully handling replies 180 183 and 200 and
          then (after natmanage route) resend to mediaserver.<br>
          <br>
          When callee client reject call  it send 480 ot 486 message
          that not resended by kamailio nowhere.<br>
          <br>
          First of all I thought that 480 and 486 replies are failure
          replies but at log I see its at onreply route.<br>
          <br>
          So Ok . I added this to onreply_route<br>
           if (status=~"48[06]"){</div>
        <div><span class="" style="white-space:pre"> </span>xlog("L_INFO",
          "Manage_Reply from webrtc client {$si:$sp} for method {$rm}:
          $rs");</div>
        <div><span class="" style="white-space:pre"> </span>rtpengine_manage("force
          trust-address replace-origin replace-session-connection
          DTLS=passive ICE=remove RTP/AVP");</div>
        <div><span class="" style="white-space:pre"> </span>route(NATMANAGE);</div>
        <div><span class="" style="white-space:pre"> </span>}<br>
          <br>
          But message just going through natmanage route and goes
          nowhere<br>
          <br>
          My NATMANAGE route is<br>
          <br>
                 xlog("L_INFO","NATMANAGE reply  {$rm}");<br>
          <div><span class="" style="white-space:pre"> </span>if
            (is_reply()) {</div>
          <div><span class="" style="white-space:pre"> </span>if(isbflagset(FLB_NATB))
            {</div>
          <div><span class="" style="white-space:pre"> </span>add_contact_alias();</div>
          <div><span class="" style="white-space:pre"> </span>}</div>
          <div><span class="" style="white-space:pre"> </span>xlog("L_INFO","reply
             {$rm}");</div>
          <div><br>
          </div>
          <div><span class="" style="white-space:pre"> </span>}<br>
            <br>
            I see at my log only first NATMANAGE xlog... no more...<br>
            <br>
            thnks for answer</div>
        </div>
      </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://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Book: SIP Routing With Kamailio - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
  </body>
</html>