In Europe we mostly rely on the indicator. If you are unsure, you just try to open the door, and you will see if it is locked or not. When it is locked, it is obviously occupied or out of order. No awkward shouting or other kinds of human interaction needed, so you can shit in peace.