By using an exploit found with iPhone’s ICCID (go to Settings, General, About), you can unlock it for free.

Follow the instructions below:
Requirements:
- Jailbroken iPhone that is not blacklisted. iPhone 3GS baseband 5.14.02, 5.15.04, 5.16.02 and 5.16.05. iPhone 4 on baseband 4.11.08 and 4.12.01.
- Computer with a fully working internet connection
- Latest version of iTunes
- Original carrier information of the locked iPhone
If you need help jailbreaking your iPhone, Google for jailbreak+iPhone model+iOS version.
Step 1: Launch Cydia and add the official repo to install SAM
http://repo.bingner.com
Step 2: Launch SAMPref on your home screen
Step 3: Select ‘Utilities‘ and then ‘De-Activate iPhone‘. The device ActivationState should now read as ‘Unactivated‘.
Step 4: Choose ‘By Country and Carrier‘ in the Method options and then locate your carrier in this list. Some networks have more than one network ID, so you may have to select the ‘SIM ID‘ option.
Step 5: Tap ‘More Information‘ and write down or copy the IMSI that is present in the ‘SAM Details‘ section before tapping ‘Spoof Real SIM to SAM‘. Head back to the main SAM screen and change ‘Method‘ to manual and paste or enter the IMSI string.
Step 6: Connect iPhone to the computer. On iTunes summary page, double click the Phone Number section of the device details and make sure that the displayed ICCID matches that found on the SIM card. If it doesn’t, go back to step 4 and try again.
Step 7: If the strings match then unplug your iPhone and disable SAM. Re-connect to iTunes and you will see error message that says device cannot be activated. This is normal. Close iTunes and then open it again.
Step 8: Your iPhone should start connecting to your network now.
If you find that push notifications are not working, select the ‘Clear Push‘ option in SAM and then connect your iPhone to iTunes.
That’s it! Enjoy your unlocked iPhone!

Sad, this unlock hardly lasted a week :{