The mute switch on my IPhone 6 stopped working this week and is stuck in the mute mode. An article I read has a temporary solution until you are able to take it to the Apple store for repair especially since iPhone 6 is still under warranty.
http://www.iphonetopics.com/iphone-6-ring-silent-switch-not-working/
Devices: iPhone 6, iOS 8.
Solution 1:-
This is a common solution to solved this mute button issue.

First turn on Assistive touch. Go to Settings -> General ->Accessibility -> Assistive touch ->on
Then Tap circle.
Choose “device”.

Now you have chance to”mute” or “unmute”.
After doing this step, turn off Assitive touch (as your wish).
SEE ALSO : How to Fix iPhone 6 Plus Volume Problems
Solution 2:-
First check your iPhone warranty status via online. If your iPhone covered any under warranty or Apple care, take the iPhone to Apple service center.
Also read Apple support guide : If your iPhone, iPad and iPod touch buttons not working?.