Having your own Private Branch Exchange just like those phone companies in your home or office is no longer out of reach or expensive thanks to a powerful software called Asterisk. It is an open source PBX, telephony engine, and telephony applications toolkit.
John Rogers from Geek.com has posted a wonderful and easy to read and follow step by step instructions on how to have your own miniature phone company in your home.
Check it out.