I always taught a rather loose class(compared to the militant types).
If the chatter got too loud for me to be able to teach, I started counting 3,2. If I got to 1 the next words from me were "One hundred side kicks...for the whole room." I only needed to do this a couple of times before the other students started shusshing the noisy ones.
It wasn't meant to be mean to the class, just to get their undivided attention.