What do I do when iPhone 5s headphone is not working?

The headphone port emits sound onto headphones but there's no response when trying to use the mic or volume buttons. This happens on all headphones that I've tried so I know its the Phone. It sometimes gets stuck on headphone mode. I've tried turning it off and on, also it is running on the latest iOS.

Buy new headphones!