I got my Lumia 1520 unlock code from AT&T, initially he said they give code only if you have been using the phone on their network for 6 months.
But I said I am going out of the country for an year and I have been using AT&T GoPhone more than 1 year and used on 1520 for a month on same number...