Use winpwn to build a custom firmware. You will need a legit copy of itunes ipsw file and then you will need the bootloader files. They can all be found on this forum. I believe you probably have a 2G iphone. The custom ipsw file will ensure that you unlock the phone. It will then also activate it and jailbreak it.
If you have a 3G, then make sure you don't upgrade to 2.2.1 because of the baseband upgrade which would make it impossible to unlock. To unlock the 3G, you need to install yellowsn0w from Cydia.
If you need more help, write back at
jsguitars@videotron.ca and I will help you.