The phone was probably patched unlock, since you did master reset... the unlock patch got wiped therefore it's locked again.
Was it orignally from Rogers? At&t? probably locked to those networks now.
You have to take it to a shop or run tutorials on how to unlock it.
I'm not an iphone user but these are the fundamentals of smartphone unlocking
Bookmarks