I came across this same problem after replacing a screen on 7+
I tried and checked everything! screen, button, speaker and plugin earphones worked ok
only the phone ear piece didn't.
as crazy as it sounds this is how I finally got it to work...
1. go to settings, General, accessibility
2. Under "Hearing" turn "Phone noise cancellation OFF and "Hearing aid compatibility" ON
3. played a memo message and ear speaker WORKED!!!
4. switched the setting on step 3, back to default. phone still works!
I don't know why this worked but it did.
this was driving me insane! I've done lots of repairs
never had a problem like this.
hope this helps someone