Hi @Tannaz pourian

If you are stuck on headphone mode first thing you can do is a quick fix if it works for you. You first turn off your iphone and with a gentle hand you can pull out any dirt or particals inside your headphone jack with a pin then clean it with a cotton bud with a little acitone or alcohol ( Don’t use too much of alcohol only little would be fine otherwise it could damage you display if it gets into your phone). Then after completing this process let it dry for a while and turn on your phone. I hope it works for you:) orthewise you have to replace your whole cc flex pannel. Good luck