Try rseating the connector
If that is no help, it is a defective part or another part is bad in the phone
Let the phone do a backup if that does not work and restore it
If that is no help, it is going to be something to do with the logicboard
How did i come up with this?
I ruled out a new dock connector, then i thought a restore could do something, and yes i thought ahead that it's hardware in the phone somewhere
All a iPhone is a battery, dock connector, logicboard, earpiece, digitizer, screen, proximity sensor(s)
Although you recently restored, you may have to again, you may want to reseat any connectors in the phone first