<p>Hi Armen,<br>
thanks for your patch, I think this feature will be very useful.<br>
I have one comment: if the tcpops module is loaded but no <code>tcp:closed</code> route is defined, a debug log line will complain about it. I think it would make sense to add a module parameter to globally enable or disable the event route lookup and execution.<br>
Besides, as many of the tcpops function can act on a per-socket basis, it would be nice to have this event route called or not called depending on the socket (e.g. using a <code>tcp_connection</code> flag and defining a new tcpops function to set/reset this flag).<br>
What do you think?</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-168677156">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZWlhqzzU_0tJOtRyJbcxxQho0d7Iks5pWmxCgaJpZM4G64Qp.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-168677156"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>