A friend of mine had the same problem with his iPhone but it was because he dropped it in water. His phone never recovered from it even after drying out. If you device has not been damaged I'd try a hard reset and if that doesn't work then I'd take it to an Apple Store and let them have a crack at it. Maybe they'll even have to replace it...
Your iPhone 6 is still under original warranty with Apple. If there was no physical or water damage, just take it to Apple and it will be replaced. If there is physical or water damage, that is the reason. Apple's regular 1 year warranty does not cover accidental damage such as that. The out of warranty replacement cost from Apple would be $299.
Have you tried going into your settings? Go to General, Accessibility and and click on Assistive Touch. A little highlighted button should appear faintly on your screen. When you tap on it this will darken and tapping on it again will expand it to options to controlling your device without using buttons. Tap on device then on mute and see if you get your ringer back. It worked for me. This button on the screen saves wear and tear on your buttons and is a back up for when buttons go out on you. Good luck, I hope this solves your problem without an outlay of cash.
This happened to my phone that was 3 days old. I tried everything and so did the Verizon store employee. He replaced the phone today. A big thank you to Joel at the Verizon in Norwich NY.
Plug in your headphones then soft reset your phone push the power and home button for 8 seconds while it is restarting unplug your headphones and that should work if you can try to blow out the headphone jack with canned air if that doesn't work if your phone is under warranty will send you another one overnight
This has been going on for ages. iPhone 4S is as far back as I experienced it. Always a result of non Apple 1/8" plug. Apples plugs do more than just pass audio. Just plug your original Apple headphones in and out a few times. That always kicked it into the correct auto detection mode for me.