Hello I've been facing this problem for a while now, The phones im using are iPhone 4S And iPhone 7.
My problem is that whenever i put a O2 Sim card in it works fine until iMessage says failed to activate I've tried everything to getting a new sim new number to even factory reset on both devices with still fail! Please help
Did you set the phone number in Settings >Phone >My Number?
It might be worth speaking to Apple Support, as if switching sims and phones it could be a backend issue on iMessage.
You can speak to them via the Apple Support website