heplify
heplify copied to clipboard
HEP Collector mode with discard methods
When using HEP Collector Mode , discard methods (dim
option) are not discarded
using freeswitch sofia capture to send to heplify (HEP Collector mode) which sends to heplify-server, heplify configured with -dim OPTIONS
but heplify still sends OPTIONS
changed decoder ProcessHEPPacket to this, seems to be working.
func (d *Decoder) ProcessHEPPacket(data []byte) {
if config.Cfg.DiscardMethod != "" {
h, err := DecodeHEP(data)
if err == nil {
c := internal.ParseCSeq([]byte(h.Payload))
if c != nil {
for _, v := range d.filter {
if string(c) == v {
return
}
}
}
}
}
pkt := &Packet{
Version: 100,
Payload: data,
}
atomic.AddUint64(&d.hepCount, 1)
PacketQueue <- pkt
}
Thanks @lazedo for the report + potential fix. feel free to push a PR if it passes your tests - much appreciated!
Hi @lazedo It's implemented here https://github.com/sipcapture/heplify/commit/acb7e54e991e52cf1c4671edd881cc2f46b16320