kamailio's sipcapture module curently do now only SREV_NET_DGRAM_IN hook.
```
/* 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;
}
```
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.
base on my prevision tests it should be in
```
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);
}
```
of course it should be called SREV_NET_STREAM_IN not DGRAM..
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/599#issuecomment-217425742