So Asterisk is possibly one of the more interesting things I have learned because of my job. Basic run down of what it is: Asterisk is a Free Open Source PBX (Private Branch eXchange) phone system. Technically saying PBX phone system is a bit redundant, as I don't think there is a use for them otherwise, but who knows. Free, meaning the software is free, open source meaning that anyone can download the source code programming for it and edit it.
I think one of the most basic reasons I like Asterisk so much is that it is free. Modern phone systems, especially for large businesses, can literally run into the the tens of thousands, if not hundreds of thousands of dollars. So for small businesses that wish that they had cool features, or large businesses wishing to save money its a great choice, assuming you have someone to manage it. It should be noted that all phone systems require a company that manages and programs them, mostly at the beginning and then support should something happen, or new features or expansion needs to be made.
If you are unfamiliar with a phone system concept here is a quick example that most everyone has seen: you go to a large business, say a hospital, and every room has a phone. Every phone has an extension and has access to features such as Voicemail, call waiting, Caller ID, paging, etc. Usually phone systems require you to dial 9 before you can call out.
The only true cost to an Asterisk box is hardware. It runs on the Linux (and a few other) platforms, so you need a computer/server that can be dedicated to this task. After that the cost is totally up to you. In my little test environment, two virtual linux servers running Asterisk, the only 'phones' that are connected are Softphones. A softphone is a software based phone that runs on your computer and uses its microphone and speakers for the calling. So in the scenario that your phones are on the computers at the office the only cost is the server.
Next we can install any number of types of input methods, such as a POTS (plain old telephone service, yes that is the real name for having a regular phone line into a building), a PRI (businesses frequently have these), a SIP trunk which I won't discuss right now, or none at all. Granted none means you can only make calls internally.
So let's discuss a hypothetical business of 5 users, with 3 inbound POTS lines. Without purchasing special phones, we can use the kind of phone you buy at Radio Shak or Best Buy, we can set up a phone system with almost every feature you could want. So we could create what is called a 'dialplan' that reacts to whatever the end user dials on the phone. So say the user dials a 3 digit extension. It would then route this call to the necessary phone in the office. If they wanted to make an outbound call, they would dial 9 and then the full number, which Asterisk would then route to the external phone network and get to the person they dialed.
Asterisk is really powerful in the fact that you can make it do nearly anything. Say, for some crazy reason, you wanted to have an email sent to a specific user every time a long distance call was placed, including what time and by what phone. YOU CAN DO THAT. You could also create a 'dialplan' or basically an extension, that when dialed, would copy a file to an FTP server and then send an email. Literally you can make it do almost anything you want it to do. Heck, you could even make a dialplan that would turn the phone system off if you wanted. (NOTE: That is a bad idea)