<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <tt>Hi, Mikhail!<br>
      <br>
      I've already replied to your question[1]. Please register to the
      opensips list if you want to get further emails.<br>
      <br>
      [1]
      <a class="moz-txt-link-freetext" href="http://lists.opensips.org/pipermail/users/2017-April/037179.html">http://lists.opensips.org/pipermail/users/2017-April/037179.html</a><br>
      <br>
      Best regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 04/26/2017 11:05 AM, Mikhail Sidorov
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+=KMpG-=goeiSh5x5rAqkF3Q1HEfE6BdK7+RTqzaqpic_e58g@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_quote">
          <div dir="ltr">Hi
            <div><br>
            </div>
            <div>I am using opensips 2.2.3 to handle websocket
              connections from web client (sip.js).</div>
            <div>I just started testing recover after opensips restart
              and find that I could not handle t_relay() failure.</div>
            <div><br>
            </div>
            <div>Assume I have a call between 2 webrtc clients and I
              restart opensips during this call. Media handled by
              freeswitch, so call continue without problem.</div>
            <div><br>
            </div>
            <div>Then, one client send BYE. I use loose_route to find
              another party and send him message.</div>
            <div>But here I got error that I could not handle.</div>
            <div>t_on_failure trigger does not fire</div>
            <div>t_relay return success.<br>
            </div>
            <div><br>
            </div>
            <div>Are there any special flags or triggers to handle this
              case?</div>
            <div><br>
            </div>
            <div>Opensips log:</div>
            <div><br>
            </div>
            <div>
              <div>loose_route success</div>
              <div><a class="moz-txt-link-freetext" href="INFO:core:probe_max_sock_buff">INFO:core:probe_max_sock_buff</a>: using snd buffer of
                416 kb</div>
              <div><a class="moz-txt-link-freetext" href="INFO:core:init_sock_keepalive">INFO:core:init_sock_keepalive</a>: TCP keepalive enabled
                on socket 16</div>
              <div>ERROR:core:tcp_connect_<wbr>blocking: poll error:
                flags 28 - 4 8 16 32</div>
              <div>ERROR:core:tcp_connect_<wbr>blocking: failed to
                retrieve SO_ERROR [server=<a
                  href="http://172.19.235.225:62594" target="_blank"
                  moz-do-not-send="true">172.19.235.225:62594</a>] (111)
                Connection refused</div>
              <div>ERROR:proto_<a class="moz-txt-link-freetext" href="wss:ws_sync_">wss:ws_sync_</a><wbr>connect:
                tcp_blocking_connect failed</div>
              <div>ERROR:proto_<a class="moz-txt-link-freetext" href="wss:ws_connect">wss:ws_connect</a>: connect failed</div>
              <div>ERROR:proto_<a class="moz-txt-link-freetext" href="wss:proto_wss_">wss:proto_wss_</a><wbr>send: connect failed</div>
              <div>ERROR:tm:msg_send: send() for proto 6 failed</div>
              <div>ERROR:tm:t_forward_nonack: sending request failed</div>
            </div>
            <div><br>
            </div>
            <div>My configuration:</div>
            <div><br>
            </div>
            <div>
              <div>if (has_totag())</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">       </span>{</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">               </span>xlog("L_ERR",
                "Following ToTag: $tt $proto");</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">               </span>#
                sequential requests within a dialog should</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">               </span>#
                take the path determined by record-routing</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">               </span>if
                (loose_route())</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">               </span>{</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">                       </span>#if
                (is_method("INVITE"))</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">                       </span>#{</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">                       </span>#<span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">  </span>record_route();</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">                       </span>#}</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">                       </span>xlog("L_ERR",
                "loose_route success\n");</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">                       </span>route(relay);</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">               </span>}</div>
            </div>
            <div>------------------------------<wbr>--</div>
            <div>
              <div>route[relay]</div>
              <div>{</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">       </span>t_on_failure("loose_route");</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">       </span>if
                (!t_relay())</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">       </span>{</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">               </span>xlog("L_ERR",
                "t_relay error]");</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">               </span>send_reply("500","Internal
                Error");</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">       </span>}</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">       </span>exit;</div>
              <div>}</div>
            </div>
            <div><br>
            </div>
            <div>
              <div>failure_route[loose_route]</div>
              <div>{</div>
              <div><span class="m_-5810722503261170666gmail-Apple-tab-span" style="white-space:pre-wrap">       </span>xlog(
                "L_ERR", "loose_route failed" );</div>
            </div>
            <div>...</div>
            <div>}</div>
            <div><br>
            </div>
          </div>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>