So the incoming request, Verto, WebRTC, SIPJS, whatever still gets authenticated with whatever credentials the web page supplies.
So you could set up anonymous registration, and validate the credentials in the dial plan.
You could dynamically validate the user and password and use those as tokens.
You could also enforce only certain CODECs, for instance Opus, and anyone not using any of those would weed out most scripts.
These measures, and Fail2Ban will prevent some unauthorized access but won’t help with DDoS or anyone actively looking to cause trouble (if an authentication token is provided by HTTPS its trivial to grab that if someone really wants to be malicious).
Most other options would be expensive (hide behind CloudFlare) or onerous (use a CAPTCHA as authentication). It comes down to balancing requirements.
If a client asked this from me we’d propose a one-time code provided on a Verto client that had a ten second timeout for login.
The issue is