Chosen Solution
This happens with all the phones I’ve owned, including the two I still have. When I make/ receive a call with aux headphones, I can hear the call, but the other line doesn’t. Note his doens’t happen with lighting or wireless headphones. And it also happens to my LG’s.
As shown in the image the pin responsible for the microphone is “AUX” , you can see that the GND and AUX pins in the female and male jack are permuted because the microphone will generate the audio (your voice) current, so first try to clean up the inside and put the male jack slightly off it’s max depth, I’ll suggest that you use voice memos or any other voice recorder application.
Hello if the microphone is working with one app and not with another it could be a software issue. I suggest that you make a back up of your phone and restore it. one other option could be to restore the network settings only. I went for an iphone x with trouble with speaker during call and to my surprise the genious guy resets the network settings and the speakers work again…it is a easy and safe thing to try, you will loose your wifi password but nothing else.