Why does my iPhone sound not work?

I have the iPhone 4S. When I'm using it, the sound will sometimes work and then a moment later, it won't work. Headphones always work, it's just when I want to play sound out loud. The volume bar will be there, and second later, it's gone and sound doesn't work.

Go to the apple store. This happened with my uncle one time as well and he managed to get his sound back.