How to hangup all calls in a channel immediately when one endpoint becomes unreachable / web sockets connection breaks

This was brought up recently at Asterisk 18.x How can we terminate the call when Web browser is exited

There is no way to do it immediately. You can set an RTP timeout or enable session timers to have it hang up after a period of defined time.