Go to Settings, and turn off Bluetooth.
Navigate to Settings, and click on Sounds. You will see the slider for Ringer and Alerts, and make sure to drag it all the way up.
Hold the lock button for a couple of seconds, and you will see “Slide to power off”. Drag the slider, and turn off your device. Turn it back on again.
To clean the lighting connector and the speaker of your device, you may use a clean brush. With gentle moves remove dust and dirt.
Go to Settings > General > Reset > Reset all Settings. One the task is done, you should follow the given steps, and to set your iPhone 4 as a new device.