Go to Settings, and tap on Sounds. Move the Ringer and Alerts Slider up, and turn the volume.
Another easy to do step is turning off your Bluetooth. To do this, just go to Settings, click on Bluetooth, and turn it off.
Press and hold the lock button, and when slider appears, slide it to turn off your device. Once it is off, turn it on again.
Use your headphones to fix the problem. Plug and unplug them from your device several times. Check the sound again. Maybe everything will work perfectly.
Often, users completely forget the speaker of the iPhone 4s can get dirty, with all the debris and dust. Use a clean brush to remove all that dust. Do it gently and carefully.