iphone 5s shows carrier and 3g but no signal
I have just bought a second hand iphone 5s and the seller told me it was on O2 I checked on website of a phone unlock service and they told me it was unlocked. I put in my EE sim and I get carrier name EE, no signal strength, then searching, then it say 3g but still no signal, then occasional I get a signal of 1 or 2 dots depending on area. I have tried in friends iphone 5s and the sim works fine as he is also on EE, but with same sim in my phone in same area no signal or searching.
His phone is still on ios 7 mine is on latest ios8.
Could the phone be locked and that is why I cant get a signal.
Also when connected to iTunes it connects ok and allows to back up or restore and shows all things on it, but it shows a different mobile number.
Any ideas please I have tried resetting network to no avail.
iPhone 5s, iOS 8.4