Hi ... Thank u so much for sharing this information.
Recently my iPhone 6 too got struck in the Headphone mode . I almost tried out all the Ways mentioned in these discussions . But nothing worked . There was no dust in my headphone jack. Then the problem is that I had been using some other brand headphones other than Apple headphones . Even though your iPhone supports other headphones , sometimes it gets struck in the headphone mode .
So I plugged my Apple headphones and started playing some songs , then unplugged my headphone , so that now it plays in speaker . I did this repeatedly. Initially it was switching back to headphones mode , even when the headset is unplugged . But when u repeat this for many times , and do a hard reset of ur iPhone .
OMG it works now :-)
So please try the following steps :
1) Play some song with the headphones unplugged. Since ur phone is struck in headphone mode , u will not hear any sound from the speaker.
2) Plug in ur Apple headphone. Now u can hear the song in ur headphones.
3) Unplug the headphone . Now it will play in ur Speakers.
If it goes back again to Headphone mode , Plug and Unplug ur headphones many times .
4) Do a Hard reset of ur IPhone .
Now ur phone will stay in Ringer Mode .
P.S: please avoid using other brand headphones with ur iPhone . Most of the times , this will cause ur iPhone to get struck in headphone mode .