After resetting your phone, did you also restore apps and files from backup? If so, it is possible that you reinfected the device from your backup files.
A factory reset would have reverted your phone to its original state and removed any threats. How are you determining the phone to still be infected AFTER the reset?
The phone is ringing to my contacts alone.
Opens random sites.
Sometimes when i talk to somebody the conversation just stop.
The phone just unlocks itself.(while locked with pattern).
By the way, what type of encryption are you using for your wireless network (WPA, WEP, WPS, none...)? Are you using a complex password to secure your wireless network and a different one for the admin account on your router?