I also had this issue, and the microphone didn't worked, on receiving and placing calls. Buth using Viber/Voice Notes/Skype/etc worked flawlessly.
What i did,
I cleaned both microphones mesh holes, bottom and the top small hole besides headphone jack (this one was obstructed by grease or dirt, i used a brush and cleaned gentle inside it).
I already had changed the Dock/Microphone flex before this (which didn't fixed the issue).
I unscrew and screw again the top screws, leaving them not so tight, also cleaned the flex connector of the dock, with a soft brush and isopropylic alcohol. (i gave it a full brush all around the iPhone, removing dirt around it.)
After all this and a couple of test call, the issue was gone! :D
Let me know if it worked for you!