<p>kamailio's sipcapture module curently do now only SREV_NET_DGRAM_IN hook.</p>
<pre><code> /* register DGRAM event */
if(sr_event_register_cb(SREV_NET_DGRAM_IN, hep_msg_received) < 0) {
LM_ERR("failed to register SREV_NET_DGRAM_IN event\n");
return -1;
}
</code></pre>
<p>and currently kamaillo's tcp_read.c don't have any possibility to do custom hook. Maybe if we can implement it similar way as for udp_read.c this can solve the issue.</p>
<p>base on my prevision tests it should be in </p>
<pre><code>int receive_tcp_msg(char* tcpbuf, unsigned int len, struct receive_info* rcv_info, struct tcp_connection* con)
{
....
if(unlikely(sr_event_enabled(SREV_NET_DGRAM_IN)))
{
....
if(sr_event_exec(SREV_NET_DGRAM_IN, (void*)sredp)<0) {
/* data handled by callback - continue to next packet */
return 0;
}
return receive_msg(tcpbuf, len, rcv_info);
}
</code></pre>
<p>of course it should be called SREV_NET_STREAM_IN not DGRAM..</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/599#issuecomment-217425742">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AF36Zcn3M0m4mUdWVCvJebMw1HNU2ZW8ks5p-zJtgaJpZM4IXogo.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/issues/599#issuecomment-217425742"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>