How to get my sound to work on my iPhone?

I have an iPhone 4s and just installed the iOS 7 software. My ringer and playing music through my phone speakers won't work. When I have headphones plugged in the sound works fine. Sometimes I will have sound coming out of the speakers and other times I don't. How do I get my speakers to work all the time?

Did you you try reset? Or try with volume adjusting.