An obvious question is have you spoken to your service provider? Because if the SIM works but the phone doesn't then it's probably worth checking that they aren't blocking the handset for any reason.
Usually phones are blacklisted because they are reported stolen ("stolen" includes "someone bought a subsidised phones on a contact and then stopped paying the contract", which is why it's advisable to do some checks when buying a relatively new phone from a private seller). Since you've had this phone for 2 years this sounds unlikely, but I'd speak to them anyway just to make sure there hasn't been an administrative error of some sort. There's also a scam that people use to get round such blacklisting, which is to replace the IMEI of the blacklisted handset with a legitimate one - the drawback of which is that if a network discovers that an IMEI has been "cloned" this way it will blacklist that one as well, cutting off the legitimate owner too (this is why you never post your IMEI on the internet). Hopefully it's nothing like this, but I'd speak to your provider just to make certain.
Otherwise I don't have many ideas. I'd do the usual, check APN settings (though that should not affect voice calls, only data) and that the phone hasn't been stuck in some strange network mode (if it shows the usual 2G/3G/4G you should be fine - if your phone supports the *#*#4636#*#* dialer code to access the "testing" menu you can check in more detail, but don't change anything there that you don't understand). But as that shortcut menu is probably the only way you could get the phone into some mode where it couldn't connect to any network in the first place it seems rather unlikely that this is the problem.