I have frequently seen issues where replying to a text I've received from another country doesn't work unless I forward the message to the same recipient from my address book. I believe it's related to how the number is presented to the phone - when it tries to send a message back to the same number it's being rejected.
Does this at all relate to what you've been seeing? Or is it truly random in terms of when you can send/receive messages?