just had the same problem, took phone to apple shop says it was water damage, which made the iphone think it was still docked and would cost £119 for a new phone, but fixed it with a simple interdental brush and magnifying glass, looking at the docking port with screen facing up, you will see a rectangular cut out, if its coloured purple then its meant to be water damage, but with a simple cleaning of this area, (I may add, i also cleaned all contacts and whole docking area) with the, "interdental Brush" you will get your volume slider back.
so i would say its not a hardware problem, as i reset, rebooted and restored and was on the verge of rebooting it right out the window when i decided to give it a clean,
this worked for me now enjoying my music headphone free,
cleaning the docking area is a delicate operation and is it your own risk, BE GENTLE