Why doesn't Messages recognize my contacts?
Go to Settings > Phone

Check that My Number is has been updated to your new number.

At times when changing SIM cards, the number does not update in this area.  This will cause issues like you have experienced.  I recently changed carriers (in the USA from AT&amp;T to T-Mobile) and experienced a similar problem after swapping the SIM card in an unlocked iPhone.

See Apple Support for more information regarding swapping SIM cards.