Only way to sort that from my knowledge without screwing around with software, is to do a carrier check on the iPhone via one of the unlocking sites. Gsmfather for example. This can take 1 minute to 1 hour to complete. What this does is let you know the exact carrier the phone was originally with. It should not cost more than 5$ from my knowledge. If you can obtain a sim card from this carrier you are sorted from there(Do not read any farther). If you cannot. You now know the exact carrier. You need to find out if the phone can be unlocked through the same website by paying an unlock fee via submitting the Imei to the servers to be released from its locked status. (Some networks cannot be unlocked through normal means) If the phone can be unlocked and you have paid the charge and waited the 24hrs or however long this process takes. Then simply connect your phone to iTunes and insert any sim card.