Hi avner1947,
If you haven't done so yet, restart your iPhone. Although this step may seem simple, restarting will refresh iOS and may help correct the behavior. Because audio is working normally when you listen to music, it's also a good idea to make sure your iPhone is running the latest iOS version, just in case the issue is software-related: Update your iPhone or iPad
If an update is available, be sure to create a backup before installing it.
Update your iPhone or iPad wirelessly
1. Back up your device using iCloud or your computer.
2. Plug your device into power and connect to the internet with Wi-Fi.
3. Go to Settings > General, then tap Software Update.
4. If you see more than one software update option available, choose the one that you want to install.
5. Tap Install Now. If you see Download and Install instead, tap it to download the update, enter your passcode, then tap Install Now. If you don't know your passcode, learn what to do.
If the issue continues, and you have access to another device, see if your EarPods and adapter work with that device. If they don't, it may be best to reach out to Apple Support directly so they can provide the options that are available. They can be contacted here: Get Support or by calling the most applicable phone number from this list: Contact Apple for support and service.
Regards.