Why does my iphone have no sound?

So I got my iphone 5 in December and have not had any issues with it until now. Sometimes when I go to play a song go on youtube ( or any other video site) or play a game no sound will be their. If I reset my phone the sound comes back so I know it's not the speakers or headphones I'm using. Just wondering if anyone else is having the same issue and if they know how to fix it. Would I need to get it repaired through apple my warranty is still in tact?

Same thing happens to my, but with my ipod touch. What I do if that happens is plug it in, and leave it alone for a while. The Sound will come back after about an hour or so. You could also try resetting

The same thing happened to my phone 4s it's the charging port if it got water in side it start messing up the volume to fix get a tooth brush and clean and turn your phone off and on ageing if that does not work take it to a repair shop

My sound isn't working. When I turn up the volume with the side buttons it has (headphones) even tho they are not plugged in. If i plug headphones in i can hear sound through them. I tried calling my iphone with my house phone and it rang. When i use siri it also has the beeping sounds siri makes. Its an iphone 5 btw