Hi @sadekianovic ,
What is the history of the phone, has it been dropped or gotten wet at all?
Given that you've done a factory reset and it still doesn't work OK, it points to a hardware problem and not software
There seems to be multiple problems although most can be associated with the headphone jack more than with the microphone e.g. headphone jack switches audio between speaker and headphones, also voice is switched as well from microphone to headphone mic, radio needs headphones plugged in for antenna etc
Does the phone indicate that the headphones are connected even when they aren't?
You may have to open the phone and check that the headphone jack is connected OK
Here's the ifixit [guide|103350] guide that may help. At least to gain access to the jack