<div dir="ltr"><div dir="ltr"><div>Hi Bogdan-Andrei,</div><div><br></div><div>Yes. 0x02 flag works. I knew this but struggled a lot to figure out where to do the t_relay(0x02). It works now and no 477 sent. Thanks!</div><div><br></div><div>Regards,</div><div>Jacky</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <font face="monospace">Hi,<br>
      <br>
      Using the 0x02 flag should do the trick . If you enable it, do you
      still see the TM sending the 477 reply automatically ?<br>
      <br>
      Regards,<br>
    </font>
    <pre cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a href="https://www.opensips-solutions.com" target="_blank">https://www.opensips-solutions.com</a>
OpenSIPS eBootcamp 2021 
  <a href="https://opensips.org/training/OpenSIPS_eBootcamp_2021/" target="_blank">https://opensips.org/training/OpenSIPS_eBootcamp_2021/</a></pre>
    <div>On 10/14/21 5:17 AM, jacky z wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">Hi Team,
            <div><br>
            </div>
            <div>I am working on msilo module for offline message
              processing. When a message receiver just closed the user
              agent but the server hasn't updated the "location", the
              server will try to send the message several times through
              TCP/TLS and failed with "477". How can we capture this
              "477" and m_store the offline message? It seems the sample
              scripts don't handle this scenario. I also tried the
              following scripts in the route[relay] and the scripts were
              not executed based on the log. Appreciate your help!
              Thanks!</div>
            <div><br>
            </div>
            <div><span style="white-space:pre-wrap">      </span>if
              (!t_relay(0x02) ) {<br>
            </div>
            <div><br>
            </div>
            <div><span style="white-space:pre-wrap">              </span>if
              (is_method("MESSAGE")) {</div>
            <div><br>
            </div>
            <div><span style="white-space:pre-wrap">                      </span>if
              (m_store("$ou")) {</div>
            <div><span style="white-space:pre-wrap">                              </span>log("MSILO:
              offline message stored\n");</div>
            <div><span style="white-space:pre-wrap">                              </span>send_reply(202,
              "Accepted"); </div>
            <div><span style="white-space:pre-wrap">                      </span> }else{</div>
            <div><span style="white-space:pre-wrap">                              </span>log("MSILO:
              offline message NOT stored\n");</div>
            <div><span style="white-space:pre-wrap">                              </span>send_reply(503,
              "Service Unavailable");</div>
            <div><span style="white-space:pre-wrap">                      </span>}</div>
            <div><span style="white-space:pre-wrap">                      </span>exit;</div>
            <div><br>
            </div>
            <div><span style="white-space:pre-wrap">              </span>}</div>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
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>
    <br>
  </div>

</blockquote></div></div></div>