I have exactly the same problem - my loudspeaker has a loose connection - that's the one on the top right-hand side of the phone where the infra-red port is. I would not recommend this, but if I knock the speaker it will sometimes work... briefly. I've just been into a repair shop today, they said they can fix it for a tenner.
Leebeejeebee, February 2007