@Michaelfengdayu Thank You!!! Your idea of tapping led me to the answer for my iPhone 5 at least. I went into iMessage and hit the microphone button on the keyboard to bring up the Mic and then whacked the side of the phone against my palm fairly hard quite a few times until the line started moving again.
Previous to this I'd had to hard restart the phone to have it work for a few seconds again, plug in and unplug a headset with a microphone, etc. It would often work again for a few seconds then stop. I even tried all the noise canceling/hearing aid mode/restore iPhone suggestions. So frustrating to answer the phone and have the other person not able to hear you, and to not be able to use siri or txt to speech. Pretty much makes the phone a barbie ipad.
The fact that smacking/tapping the phone could restore functionality lead me to some online searching and I learned about the well know issue with iPhone microphones in the repair industry, it is just another manifestation and problem related to the well documented design flaw referred to as the "grounding issue", and yes apple knows about this. Apparently it is third most common hardware repair issue after cracked screens and debris in the audio jack and if your phone is under warranty they will replace it. If it isn't don't despair it can be fixed.
People can search this out themselves, search you-tube for "iphone mic fix" there are a number of videos showing the fix. There are two things you can do to prevent it from reoccurring and fix the issue, loosen the grounding screw, and inserting an L shaped piece of cardboard into the back of the phone. I hope this information is as helpful for others as it was for myself. I can use my iPhone 5 again. Hurray!
The reason this hardware issue cropped up for so many including myself after the latest iOS update is like due to a change in the software controlling how the hardware interprets and reacts to this state, leading many to assume that it is a software issue. I hope this helps. Cheers.