iMessage inconsistently failing to work after Sim card swap I recently swapped my Sim card in my iPhone 4, to move to another carrier.  I ported my number across so there is no change other than the actual Sim card.

Since then, iMessage seems to be entirely inconsistent in whether it will actually work or not.  Messages will wait for ages before failing with a "Not Delivered" message, to recipients that I previously used iMessage with.  Failed messages will not even send as an SMS instead, even though this setting is turned on and would be used in the past.

I have turned iMessage on and off several times.  I have checked it is receiving at the correct addresses (my phone number, which is correct, and my Apple ID email address also).  Sometimes this works, sometimes it fails to activate, and just says it's waiting, sometimes it does nothing except return me to the screen without making any changes, or I get "An error occurred during activation, try again".  Often it will ask me to re-sign into my Apple ID, which will usually fail.

Rebooting the phone normally or with a force reset makes no change, although sometimes rebooting it with iMessage disabled, will start it up with it enabled and working...  Eventually after messing around in the settings app it will show as enabled and receiving at the proper addresses, and then it may work for a while longer, but at some random interval which could be hours or minutes it will start to fail to send them again.  Right now everything is showing as "ON" apart from the subject line setting, and it is set to receive at the proper addresses, but failing to send anything.

I am running the latest OS update, non jailbroken.

Any clues as to why this happens, and how I can prevent it?

EDIT:

I am now in a curious half way house, where I get the bubble to show someone is replying to my messages etc, but my own messages are still sent as text messages.  I send a message, it goes as a text, I see the reply being types and it's delivered, presumable all this happens over the iMessage system, and my next reply is still a text.  Genius :)

EDIT 2:

So, I can now see the "speech bubble" that implies someone is typing a reply.  The reply, however, never arrives.  I have turned iMessage off now.  I get free texts anyway, I just liked the read receipts :(
Have you tried resetting the network settings with iMessage turned off?

To reset your network settings, tap 


Settings > General
Then scroll down and tap Reset > Reset Network Settings


When the device restarts, turn on your iMessage again and let it activate.