My wife has a nonprofit organization and I manage the IT for her (Visit us here https://www.facebook.com/myCAF). since we are a nonprofit we try to get the most out of our money so we can use it to help other people. When fist trying to get phone lines for our offices we had ridiculous prices like $250.00 a month for one line and 4 extension.
After searching the internet I found that I could host my own PBX server and manage my number voicemail attendant etc. among other I choose Elastix (https://www.elastix.org ) that is an open source PBX based on Asterisk, but there are other to choose from. It is easy to set up I started with an old PC (and dell Optiplex 620).
I bought my numbers from Callcentric.com but later I changed to Voip.ms.
I currently have three office on that server with a total of 12 extension and I’m about to add 4 more. I can receive faxes to the server and calls from office to office no matter where they are in the world are free. and with sip app in my cellphone I can be anywhere and be connected to my server and make calls like I’m in the office. There is a lot more feature that you can implement for your office or home. even use google number to make free call etc.
Any question I’ll be glad to answer.