If, like myself, you have had your iPhone 4 with AT&T for some time and decided to switch to a new iPhone 5 while selling or giving away your older phone to someone else, you would need to go through the AT&T unlocking procedure that requires meeting certain conditions and submitting an unlocking request online.
The unlocking request page will ask you to fill out some required information; such as your wireless number and last four digits of your social security number. These pieces of information are needed to find and verify your account in the AT&T's customer database.
They will check if your account is in good standing (there are no overdue payments, etc.), and will generally issue an unlock within 5-7 business days. There are services like Keys2iPhone that help speed up this process which may be handy for those who are flying abroad and want to save on roaming charges by using a local carrier.
Things may get a bit dicey if one is trying to unlock a second-hand iPhone. The rule is: one must be the iPhone's original owner in order to qualify for an official unlock from AT&T. On the unlocking request page there is an option for Non-Customers to submit their unlocking requests with the following fine print:
After you submit your information, you'll receive a request number and a fax number. Use the fax number to send a copy of your original receipt with the request number and IMEI. In 5 to 7 business days, you'll receive an email at the email address you gave us giving the status of your request.
Not only will you need to wait 5 to 7 business days, the major problem is where to get the purchase receipt? If you were sold an iPhone on eBay, for instance, and the seller did not include the original receipt with your purchase (what are the chances?!), you may be out of luck with the AT&T's unlocking page. Your options then are to either ask the seller to get an unlock for you or go through a third party unlocking service like the one mentioned above.
Ideally, you would like to buy an already unlocked iPhone to save yourself time and hassle. So, it would be wise to run a check on the iPhone's status in the official Apple's database. One can request the seller to provide the iPhone's IMEI number in order to perform such a check before going ahead with the purchase. The IMEI report will show if the iPhone is currently locked and to which carrier as well as whether it was reported lost or stolen. FYI: AT&T won't unlock the handset if it was reported lost or stolen.
About iPhone Unlocking
While over 100,000 people endorsed the petition to the White House to allow permanent iPhone unlocks and using handsets on various networks, it seems the U.S. mobile industry remains skeptical about the decision by Obama administration to cast support for such request.
Top mobile carriers are against soft unlocks because they want to sell more devices at cheaper rates allowing users to take advantage of subsidized prices in exchange for agreeing to stick to the two-year contract. Understandable. What is counter-intuitive, in my opinion, is that, according to the industry, users should not be granted the right to get their iPhones unlocked after the contract expires. In my view, if I own an older iPhone model and would like to switch to a new one, I should be able to get a quick unlock without any hassle, so I can resell my old phone on the secondary market or give it as a gift to someone else to be used anywhere in the world.
While new iPhone 5 is sold already unlocked by some carriers like Verizon, most older iPhone versions like my iPhone 4s as well as other smartphone models (e.g. Samsung Galaxy) may require considerable effort from users to get official unlocks for.