I hit the basics in my other post but missed your activation question.
There are really two parts to the activation story; your SIM is activated by your carrier and your iPhone is activated using iTunes. When you complete the phone activation with iTunes is contacts the Apple servers and looks up your phone's IMEI to see if it is in the "Unlocked" list. If you have a carrier locked iPhone it will only work with your carrier's SIM cards.
Here is the official Apple list, you will want to verify the part number to see which carrier and the features that are really supported.
Valid Unlock countries:
http://support.apple.com/kb/HT1937
Activation information by Country:
http://support.apple.com/kb/HT1937?locale=en_CA
Dave
When iTune sends the information to Apple server, I know IMEI and ICCID(Sim card id number) are sent, but how does the entire activation process work?
Here's what I think how it works:
1. Apple iPhone server transfer the information to AT&T server, so AT&T has the information of what device(IMEI) and what number you're porting to(by the information of the iTune when you first input in the activation screen), verify the information, and adjust it, things like extend the contract date, add iPhone data plan on the line you're going to use, then de-activate your current SIM, activate the SIM card in your iPhone.
2. Once the process is done from the AT&T side, Apple server verifies the IMEI, and updates on the database, so this iPhone become activated, next time when you update or restore the iPhone, Apple verifies the phone to see it has been activated, no need to activate again.
Don't know if this is how it works?
Please correct me if I'm wrong.