<p>Hi Daniel,</p>

<p>I just repushed this branch. Originally, I only considered tcp connection kill via TCP RST (which results in read() == -1 && errno == ECONNRESET) and timeout events (read() == -1 && errno == ETIMEDOUT).  I have revised my branch to also execute the event_route on gracefully-closed TCP connections (i.e. via TCP FIN), which is delivered to the program as read() == 0 (i.e. EOF).</p>

<p>Additionally, I have restricted the execution of this event_route that have a $conid variable that does not evaluate to "" in the script.  This is determined via connections that have TCP_REQ_COMPLETE(req) set to true (which is when con->id is copied to con->proto_reserved1).  Do let me know if this is not the correct strategy here.</p>

<p>Thanks!</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/pull/454#issuecomment-168128187">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZSJOEvG5XtT0QSglbQ7fYpIZ3I3Zks5pVLffgaJpZM4G64Qp.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/pull/454#issuecomment-168128187"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>