Try cleaning out the doc connector, head phone socet and the little tiny hole next to the head phone socket.
I found that a paper clip was a useful tool for the job.
After clearing out all the fluff and dirt from these areas. Gradually the microphone started to again for me.
I couldn't talk on phone without speaker phone active or headphones plugged in. I couldn't record voice messages. It's happened twice to me and both times this has corrected the issue for me.
I tested by making a voice recording and then called my 2nd phone to test calls were working as expected.
Regards