What number does imessage use?

I found an iphone today so i took it home and master reset it. When i reset it i never took out the sim card so when it booted up i took out the card. I'm using the thing like normal now and tried imessaging one of my friends. How is this working with no sim card in it? I have ios 7

You don't need a sim for that, its over Wi-Fi if no celltower