Turn off your PS3/Xbox at the back, turn off your modem/router from the socket, leave it to cool for a minute or 2, turn on the modem/router, leave it to turn on fully (leave for a minute or 2 should be good), turn on your ps3, sign into PSN, leave it also for a minute or 2.
Go on COD, try it out
If it doesn't work the server might be having some problems or your internet doesn't like your firiends internet