I disagree with the comment that if you detect gunfire in a building you should not leave. I think that the best thing that you can do is leave the building if the shooter is not directly covering an exit.
In school shootings, the highest casualty counts come from people hunkered down trying to look small while the shooter sorts his way through them. I heard a school administrator say that it's important to stay in one place so that they can get an accurate count of how many students have escaped. My opinion is that's it's better to be alive than to be counted. Get out, survive, call in once you have exited the area. Your folk will be happier that you are still alive even if they worry for a while because you weren't accounted for initially. They will be crushed if you are accounted for as the third body under a sheet to the left.