Call Defence will be able to spot scam or spam calls and flag them to users before they answer the phone, O2 said.