Why does my iPhone 4s have no sound?

I've seen people ask this but it's not matching up to what's happening with my phone. When the sound comes back on it stays on for like 10 seconds and stops for 10 seconds and then goes back on for 10 seconds. Same thing with my earphones. People say just to put ear phones in but it still turns off and on but a little longer and this happened for a day and still isn't fixed. What do I do?!

Here's how you fix it plug your charger in then connect the iphone, go in you tube and play a video while it's playing there's no sound grab the charger port at the bottom pull it out very slightly and wiggle it about it may take a little while but the sound WILL come back on…