I've found out what the cause of this problem is (most of the time - more on that in a minute), and the prognosis is not good, unfortunately. Here's as basic a breakdown of the problem as I can manage: Your iPhone 4 has two microphones. One is on the bottom, next to the speaker, and the other is on the top (it is the small hole next to the headphone jack). When you make a FaceTime call, only the small mic on the top is used to pick up your voice. This also applies to video recordings and Voice Memo recordings. When you make a phone call, however, both the bottom mic and the top mic are used at the same time. The small mic on top is used in conjunction with the one on the bottom as a "noise cancellation" device. It helps eliminate background noise such as wind, loud music, or other "noise" to make it easier for the person on the other end hear you better.
To perform this function, the iPhone uses a small chip on the motherboard called an Audio Compiler. It is so tiny, about 50 of them could be put on the face of your average postage stamp. The Audio Compiler takes the signals from both microphones during a call and "compiles" them together before sending the signal out to the person you are speaking with. If this audio compiler doesn't work, then the person on the other end will not hear you - or they will hear a very muffled voice, or a lot of static. Due to what is largely believed to be a manufacturing error in Apple's Chinese factories, a number of iPhone 4 models were assembled with this tiny chip soldered to the mainboard (motherboard) improperly. Either too much solder or glue was used, and the connection is tenuous at best.
The problem is that the phone could work perfectly for a very long time, and then after a drop (even one that doesn't break the glass), a hard jar, or even for no reason at all, this chip loses its connection to the mainboard and causes the problem you may have experienced.
Fixing this problem is even more complicated than explaining it, unfortunately. In some rare cases, you may be able to shake your phone really hard, or squeeze it together really firmly (be careful doing this, you can break the glass and damage your fingers as well as your phone) and the chip will make a connection again. This may fix the problem for a while, but it is all but guaranteed to come back.
Some claim that the problem is the small mic on top of the phone and that it can be remedied by straightening out a staple and gently putting it inside the microphone opening and moving it around. I suppose this is possible, but I've not seen it work before. And again, even if it fixes the problem, it is likely to be only temporary before the problem returns, because the mic is not the problem in most cases.
Some local places will also tell you that the simple fix for this problem is to replace the microphone/speaker/charging port assembly at the bottom of the phone. Again, this *might* fix the problem, but it is unlikely. You'll probably get temporary (if any) fixes to this issue and the problem will return.
Yet another theory is that removing and re-seating your SIM card (AT&T phones) can fix this problem. I've never seen it work, but that doesn't mean it isn't worth trying. You are likely to get a temporary fix to the problem here, as well.
The only 100% guaranteed way to fix the problem is a process known as "reballing" the Audio Compiler. Basically that involves removing the mainboard from the phone, removing the EMI shield from over the main processor, getting a directional, adjustable heat gun (designed specifically for removing soldered chips from motherboards), setting the heat gun to the exact right temperature so you don't burn up the mainboard, heating up the chip that needs to be removed (being really careful not to heat any of the main processor's connections in the process), place the compiler chip onto a template (that I guarantee you don't have), put fresh solder on each of the connections, replace the chip, reheat it to connect it back to the board, and replace everything back the way it was. All of this on a square that is 1/50th the size of a postage stamp.
I do not have the equipment or the cajones to attempt this fix, and therefore will not attempt this fix. I also won't lie to you and tell you that I can fix the problem. Anyone who tells you that they can fix this issue with parts or hacks or whatever is either lying or doesn't know what they are talking about. I did a search, and the only places where this can be done easily and cheaply are Beijing and Dubai. That's CHINA and INDIA. After hours and hours of searching for anywhere in the United States that performs this procedure, I couldn't find even one. Anywhere in the UNITED STATES, much less Paducah, Kentucky. I'm sure there are guys that have the equipment and the skills to do this around here, but they don't advertise.
If you are one of those guys, get in touch with me. We may have a very interesting partnership in our collective futures.
So what do you do if you are having this problem with your iPhone 4 and have just read this article?
Call Apple (or go to the nearest Apple Store which is in Franklin, TN) and pray that you are still under warranty. If you are under warranty, they should replace the phone for free. Assuming that you've never had it repaired at a non-authorized Apple service center, or opened the phone, or gotten it wet, or looked at it funny, or breathed on it, that is. If you were one of the lucky ones that purchased an extended warranty plan through your cell carrier, you'll probably be in luck. For a small deductible, they will likely replace the phone for you.
If you are not under warranty, it is likely that a new phone is in your future. Re-up your contract and get another one. The good news is that someone is likely to buy your current phone for parts, so at least you could make some of your money back.
Get in touch with me if you need more information about this problem, or if you want to prove me wrong by showing me how you have fixed this problem permanently.