My phone fell in a very small quantity of snow a couple of hours ago. I kept getting the "This accessory is not optimised for this iPhone" (you may experience noise caused by mobile interference and a decrease in mobile signal strenght) message error.
I restarted my phone by pressing the On/Off button and the home button at the same time for a couple of seconds until the screen turned black and the white apple logo came up. After I did this, I noticed I didn't get any sound through the speakers. I could hear music/sounds with my earphones plugged-in but not without having them pluged-in (not even the clicks from the lock screen). The only sound I could hear without the earphones was the ringer when I would receive phone calls.
I searched on the internet for a fix and none of the solutions worked for me like cleaning the headphone jack with a Q-tip, cleaning the doc connector with tissue or paper, inserting a needle in the top microphone whole etc... until I found an easy solution:
1 - Plug-in your earphones
2 - Open the "ipod/itunes" app on your phone
3 - Play music
4 - Unplug your earphones
5 - Repeat these 4 steps about 3 or 4 times on a row. If after doing this you don't hear sound, don't freak out! It's normal. Don't forget that your iphone automatically pauses your music when you suddently unplug your earphones while the music is still running. Just press the "PLAY" button and voila!
I hope this helps!
Jaqueline