Hi,
Before going to deep in the phone, I would reccomend looking at same basics first.
Rule out software by backing up the device and restoring it. Test the calls without anything installed on the phone first.
Rule out the battery. Most iPhone 7 batteries need a replacement by now. A bad battery can often cause random, or odd shut downs or restarts.
You can test those in what ever order that is more convinient for you.
Let me know if that helps, if not i’d be happy to help continuing troubleshooting further