<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <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 class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS eBootcamp 2021 
  <a class="moz-txt-link-freetext" href="https://opensips.org/training/OpenSIPS_eBootcamp_2021/">https://opensips.org/training/OpenSIPS_eBootcamp_2021/</a></pre>
    <div class="moz-cite-prefix">On 10/14/21 5:17 AM, jacky z wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOB03Dvv=vXJoWA+iAGr=at0ActjYkrOfiGRV7dhtaok3DGYyQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <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">   </span>if
              (!t_relay(0x02) ) {<br>
            </div>
            <div><br>
            </div>
            <div><span style="white-space:pre">           </span>if
              (is_method("MESSAGE")) {</div>
            <div><br>
            </div>
            <div><span style="white-space:pre">                   </span>if
              (m_store("$ou")) {</div>
            <div><span style="white-space:pre">                           </span>log("MSILO:
              offline message stored\n");</div>
            <div><span style="white-space:pre">                           </span>send_reply(202,
              "Accepted"); </div>
            <div><span style="white-space:pre">                   </span> }else{</div>
            <div><span style="white-space:pre">                           </span>log("MSILO:
              offline message NOT stored\n");</div>
            <div><span style="white-space:pre">                           </span>send_reply(503,
              "Service Unavailable");</div>
            <div><span style="white-space:pre">                   </span>}</div>
            <div><span style="white-space:pre">                   </span>exit;</div>
            <div><br>
            </div>
            <div><span style="white-space:pre">           </span>}</div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-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>