Plug the headphones in and remove them maybe?
Clear out any dirt or anything that might be stuck in there.
You dont have any water damage right.
Sometimes people think its ok to talk on their iphone in the rain even if its a light drizzle.
If a few drops of water fall inside the headphone jack hole it might cause damage.
To resolve it I used a cotton bug and some cleaning alcohol and cleaned the inside of the headphone port. It took a few goes before it had been cleaned enough to start working again.