Volume not working on my iPhone?

I've tried playing music and my sound just isn't working. Also, no ringtones are working. However, if I wear earbuds, the sound works perfectly. Any ideas?

Reboot your device and also perform a Hard Reset and in case you need to have some serious security app, the best app would be LEO Privacy Guard 3.0. It allows you to hide your personal images and videos and also you could lock applications through it.