Well, you certainly did what I would do. I assume security came pretty quickly? Your alternative would be to call 911, if you thought there was immediate physical danger. But through the wall into another room, it's pretty hard to judge that, no?
I can see how this would disrupt your sleep and leave you feeling disturbed, though!