private void HandleUserCall(object sender, CallEventArgs e) { if (!e.Call.IsAudio) { DataCall dc = (DataCall)e.Call; switch (dc.DataType) { case CallDataType.LRRP: if (this.lrrp != null) { if (lrrp.RecentlySent(dc.LRRPPacket, this.GetIPForRadio(e.Call.To))) { //Drop this... return; } else if (lrrp.DebouncePacket(dc.LRRPPacket, this.GetIPForRadio(e.Call.From), dc)) { //Sent through LRRP processing, drop it... return; } } break; case CallDataType.TMS: if (this.tms != null) { if (tms.RecentlySent(dc.TextMessage, this.GetIPForRadio(e.Call.To))) { //Drop this... return; } else if (tms.DebouncePacket(dc.TextMessage, this.GetIPForRadio(e.Call.From), dc)) { //Sent through TMS processing, drop it... return; } } break; } } this.InternalCallHandler?.Invoke(sender, e); if (!e.Handled) { this.GotRadioCall?.Invoke(sender, e); } }