Try the speakerphone. If that doesn't work, the phone has to go into a repair shop.
If it works, look for the little mic hole in the bottom of the phone. Shine a bright light into it and look (you may need a magnifying glass) for lint and dust. If you find any, use a thin sharp wooden toothpick to clean it out.
If none of that works, it still has to go into a repair ship. (Or you can just use the speakerphone.)