Well, the first thing I would do would be to take the phone apart and check the speaker & contacts. Sometimes that contacts for the speaker oxidyse, or if you put too much pressure on the phone, it 'squashes' the speaker contacts & then they don't retract and make contact anymore (experience with K750i & W810i).
Have you checked the settings of your phone? Or even try flashing different firmware.