Try using the earphones with the microphone attachment when making or receiving a call.
If there is no problem when using the earphones and microphone attachment, there may be a problem with the phone's internal microphone. It may be either faulty or loose from the systemboard.
There is also another possibility. The voice inlet hole at the bottom of the phone may be blocked with lint, Use a strong light and a magnifying glass to check to see if it appears blocked at all. If it appears to be, DO NOT use a probe (pin) to clear the hole as you might damage the microphone which is directly behind it. Try a vacuum cleaner, using short bursts and see if this clears the blockage.