i had a customer's phone do this and did every reset possible and couldn't fix it. i figure the charging port got jacked up because the phone always thought it was in car mode. even when turning off the car mode app, it still answered
pr made a call automatically to speakerphone. we sent it to our service center and he was given a new phone.