<div dir="ltr">Thanks Daniel.  I will give that a try.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 9, 2017 at 12:08 AM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p>Add a failure route execution:</p>
    <p>if(is_method("UPDATE")) {</p>
    <p>  t_on_failure("FRT_UPDATE");</p>
    <p>}</p>
    <p>if (!t_relay())</p>
    <p>... your rest of the code here</p>
    <p>At the end of kamailio.cfg add:</p>
    <p>failure_route[FRT_UPDATE] {</p>
    <p>  xlog("sending UPDATE failed\n");</p>
    <p>}</p>
    <p>and watch the logs to see if the xlog message appears.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p><div><div class="h5">
    <br>
    <div class="m_405283783551275744moz-cite-prefix">On 08.12.17 18:21, Andrew Chen wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div dir="ltr">Btw...I do call sl_reply_error() on relay fails. 
        Below is a sample block:
        <div><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px"><br>
          </span></div>
        <div><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px">if
            (!t_relay())</span><br>
        </div>
        <div>
          <p class="m_405283783551275744gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_405283783551275744gmail-s1" style="font-variant-ligatures:no-common-ligatures">{</span></p>
          <p class="m_405283783551275744gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_405283783551275744gmail-Apple-converted-space" style="font-variant-ligatures:no-common-ligatures">   
               ....log some errors....</span></p>
          <p class="m_405283783551275744gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_405283783551275744gmail-Apple-converted-space" style="font-variant-ligatures:no-common-ligatures">     </span><span style="font-variant-ligatures:no-common-ligatures">sl_reply_error();</span><br>
          </p>
          <p class="m_405283783551275744gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_405283783551275744gmail-s1" style="font-variant-ligatures:no-common-ligatures">}</span></p>
          <p class="m_405283783551275744gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_405283783551275744gmail-s1" style="font-variant-ligatures:no-common-ligatures">else</span></p>
          <p class="m_405283783551275744gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_405283783551275744gmail-s1" style="font-variant-ligatures:no-common-ligatures">{</span></p>
          <p class="m_405283783551275744gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_405283783551275744gmail-s1" style="font-variant-ligatures:no-common-ligatures">   
               ....log successful relay....</span></p>
          <p class="m_405283783551275744gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_405283783551275744gmail-s1" style="font-variant-ligatures:no-common-ligatures">}</span></p>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Fri, Dec 8, 2017 at 9:15 AM, Andrew
          Chen <span dir="ltr"><<a href="mailto:achen@fuze.com" target="_blank">achen@fuze.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">Hi Daniel,
              <div><br>
              </div>
              <div>Thanks for the response.  The question that's been
                raised by our engineers is how do we know the message
                that's put in the queue actually successfully been sent
                on the wire/network?  Have there been situations where
                it gets stuck in the queue and never sent out?</div>
              <div><br>
              </div>
              <div>Thanks.</div>
              <div>--Andy</div>
            </div>
            <div class="gmail_extra">
              <div>
                <div class="m_405283783551275744h5"><br>
                  <div class="gmail_quote">On Fri, Dec 8, 2017 at 12:35
                    AM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
                      <span><br>
                        <br>
                        On 08.12.17 02:23, Andrew Chen wrote:<br>
                        > Hi all,<br>
                        ><br>
                        > So for a while now I've been working with
                        our engineering team to<br>
                        > troubleshoot these random events where the
                        UPDATE message sent from<br>
                        > the server never made it to the client
                        side.  Here is the the topology:<br>
                        ><br>
                        > Server -(tcp)-> kamailio -(tls)->
                        client<br>
                        ><br>
                        > So looks pretty straight forward and I have
                        logging messages stating<br>
                        > t_relay() was successful in sending the
                        message.<br>
                        ><br>
                        > The question is how do we know t_relay
                        really successfully sent it? <br>
                        > Does it actually monitor the physical
                        interface as it goes out?<br>
                        ><br>
                        ><br>
                      </span>t_relay() may return successful code if the
                      message was put in the<br>
                      writing queue. Later can be another log message if
                      sending ended int a<br>
                      transmission timeout. Do you have a failure_route
                      set for such<br>
                      t_relay()? If not, you can add one, it should be
                      executed if sending fails.<br>
                      <br>
                      Cheers,<br>
                      Daniel<br>
                      <span class="m_405283783551275744m_-2634588348905379290HOEnZb"><font color="#888888"><br>
                          --<br>
                          Daniel-Constantin Mierla<br>
                          <a href="http://www.twitter.com/miconda" rel="noreferrer" target="_blank">www.twitter.com/miconda</a>
                          -- <a href="http://www.linkedin.com/in/miconda" rel="noreferrer" target="_blank">www.linkedin.com/in/miconda</a><br>
                          Kamailio Advanced Training - <a href="http://www.asipto.com" rel="noreferrer" target="_blank">www.asipto.com</a><br>
                          Kamailio World Conference - May 14-16, 2018 -
                          <a href="http://www.kamailioworld.com" rel="noreferrer" target="_blank">www.kamailioworld.com</a><br>
                          <br>
                        </font></span></blockquote>
                  </div>
                  <br>
                  <br clear="all">
                  <div><br>
                  </div>
                </div>
              </div>
              <span class="m_405283783551275744HOEnZb"><font color="#888888">-- <br>
                  <div class="m_405283783551275744m_-2634588348905379290gmail_signature" data-smartmail="gmail_signature">
                    <div dir="ltr">
                      <div>
                        <div dir="ltr">
                          <div dir="ltr" style="font-size:12.8px">Andy
                            Chen</div>
                          <div dir="ltr" style="font-size:12.8px">
                            <div>Sr. Telephony Lead Engineer</div>
                            <div>415 516 5535 (M)</div>
                            <div><a href="mailto:achen@thinkingphones.com" target="_blank">achen@</a><a href="http://fuze.com" target="_blank">fuze.com</a></div>
                            <div><br>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </font></span></div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div class="m_405283783551275744gmail_signature" data-smartmail="gmail_signature">
          <div dir="ltr">
            <div>
              <div dir="ltr">
                <div dir="ltr" style="font-size:12.8px">Andy Chen</div>
                <div dir="ltr" style="font-size:12.8px">
                  <div>Sr. Telephony Lead Engineer</div>
                  <div>415 516 5535 (M)</div>
                  <div><a href="mailto:achen@thinkingphones.com" target="_blank">achen@</a><a href="http://fuze.com" target="_blank">fuze.com</a></div>
                  <div><br>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      </div></div><span class=""><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">*Confidentiality
        Notice: The information contained in this e-mail and any</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
      <span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">attachments
        may be confidential. If you are not an intended recipient, you</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
      <span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">are
        hereby notified that any dissemination, distribution or copying
        of this</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
      <span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">e-mail
        is strictly prohibited. If you have received this e-mail in
        error,</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
      <span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">please
        notify the sender and permanently delete the e-mail and any</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
      <span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">attachments
        immediately. You should not retain, copy or use this e-mail or</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
      <span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">any
        attachment for any purpose, nor disclose all or any part of the</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
      <span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">contents
        to any other person. Thank you.*</span>
    </span></blockquote>
    <br><span class="">
    <pre class="m_405283783551275744moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="m_405283783551275744moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a class="m_405283783551275744moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="m_405283783551275744moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a>
Kamailio World Conference - May 14-16, 2018 - <a class="m_405283783551275744moz-txt-link-abbreviated" href="http://www.kamailioworld.com" target="_blank">www.kamailioworld.com</a></pre>
  </span></div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr" style="font-size:12.8px">Andy Chen</div><div dir="ltr" style="font-size:12.8px"><div>Sr. Telephony Lead Engineer</div><div>415 516 5535 (M)</div><div><a href="mailto:achen@thinkingphones.com" target="_blank">achen@</a><a href="http://fuze.com" target="_blank">fuze.com</a></div><div><br></div></div></div></div></div></div>
</div>

<br>
<span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">*Confidentiality Notice: The information contained in this e-mail and any</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">attachments may be confidential. If you are not an intended recipient, you</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">are hereby notified that any dissemination, distribution or copying of this</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">e-mail is strictly prohibited. If you have received this e-mail in error,</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">please notify the sender and permanently delete the e-mail and any</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">attachments immediately. You should not retain, copy or use this e-mail or</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">any attachment for any purpose, nor disclose all or any part of the</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">contents to any other person. Thank you.*</span>