Try these options:
If you see the icon like this when you adjust the volume buttons, there may be broken piece or dirt in the headphone port.
Unplug and re-plug iPhone headphones several times (at least 8 to 10 times). Use hairdryer or toothpick on the iPhone headphone port to remove broken headphone jack or dust.
If you spilled milk or Pepsi like water, use q-tip (with the cotton ripped off)
Reset the iPhone. Press and hold Sleep/Wake button and Home button together until Apple logo appears.
Play a song (lengthy duration) and allow iPhone to completely lock.
Now insert iPhone compatible headset jack.
Unlock iPhone. Stop audio and unplug jack.
Plug in headset when phone is locked.
Hold down power button. It will bring “slide to power off” bar.
Now remove the headphones.
Press the “cancel” button at the bottom of the screen.
Now check the sound.
Connect your iPhone via Bluetooth to a speaker system.
Play a music.
Switch from speaker system back to Phone.
The headset jack is actually electronic so if all the other suggestions he mentioned failed do a hard reset which wipes out the phone completely. Then it should work. If not and if it's still under warranty I would travel to the Apple Store or call them for a replacement. I would tho back up the phone before you perform the hard reset tho.
Help is here! We surely don’t want for the headphone mode to continue. Were you doing any specific on the phone when this happened? Have you tried to turn the phone completely off for a minute & then back on. Weth, I appreciate the helpful steps. Have you been able to take a look at those steps?
Follow us on Twitter @VZWSupport
If my response answered your question please click the �Correct Answer� button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!