So the external speaker on my iphone wasnt working and I found this thread on google. Seems like this is a common problem with no real solution. I ended up fixing mine so I signed up so I could share my solution.
The symptoms my phone experienced:
- Music would not play thru external speaker
- No text/email tones thru external speaker under normal use though I could get text tone/email tone to play thru the speaker by changing the tone in Settings
- No sound when dialing phone numbers under normal use though I could get the phone keypad to make beeps when simultaneously playing music thru AppleTV via airplay
- Airplay options showed AppleTV and dock connector (when at home)
- Headphones worked fine
As noted, I knew the external speaker was working. I tried to clean the dock connector and headphone jack using canned air and electronic contact cleaner, no luck. Tried repeatedly plugging in and removing the dock connector and headphones, no luck. Reset, restored, no luck.
How I fixed mine: I borrowed a friends FM transmitter that uses the dock connector to play music thru car radio. I set it up in my car, and plugged the phone in; the phone recognized the accessory and played thru the radio. I let it play for about 20 minutes and shut off the car then rebooted the phone. It's worked properly since. Not sure if rebooting mattered, and pretty sure any accessory that plays audio and connects via the dock connector will work.
Good luck!