I am getting this sometimes in my house.
I think is caused by interference with another devices (bluetooth JBL and wifi's computer)
Trick to everybody: When you get this problem, try to disconnect all the other devices (bluetooth and wifi), and try to connect the iPhone to the router again with all other the devices turned off!
Answer if works!