You would want a SIP Proxy or an SBC. With that being said, if they aren’t properly configured that can cause more damage than good.
Kamailio & OpenSIPs are known good proxies. You can google how to set up a relay proxy, but you’ll generally want to do domain auth, UA verification etc.
Additionally, you can also add API Ban to your server to prevent drive-by attack noise.