Fix For Muted iPhones
It looks like some of you iPhone users have been having problems with an iPhone that refuses to play audio through the built-in speaker, despite no known hardware irregularities. A cure for a “muted iPhone” has been found.
The problem with iPhone’s that refuse to play audio through their speaker is that they believe that there is a headset still plugged in when there is none. Because it thinks there is a headset connected, it mutes the audio to the speaker.
To fix this, you simply need to clean out your headphone port. To do this, just insert and remove the headphone jack from the port a few times. If that doesn’t help, your port might be dirty and need to be cleaned with some Windex and a cotton swab as demonstrated here by Alan Lucow. However, be warned; Apple’s Warranty Department may not appreciate the latter approach, so be careful.