Various countries have used dug in tanks and tank turreted bunkers for many years. A few examples include the Soviets using dug in IS-IIIM's in the Kurile Islands along with other obsolete tanks on the Chinese border. The Austrians used Centurion and M47 turrets in their border defenses as well.
In WW II, the Germans used all sorts of tank turreted bunkers, including turrets from Panthers, Pz I's, II's, 35(t)'s and so on. They used lots of French turrets too. A good source of information on German tank turreted bunkers is a pair of books from Thomas Jentz and Hillary Doyle. They can be found in the Panzer Tracts line of publications. Here's a link to their website:
Panzer Tracts The Israelis have also used obsolete M50 and I think M51 Shermans as pillboxes in there border defenses.
Chris "toadman" Hughes
Toadman's Tank Pictures