Parts of a FreePBX System
There are several components that make up a FreePBX system. The main ones are outlined here.
The server is any computer on which you've installed Linux, FreePBX, Asterisk, and any other programs needed to run your phone system. The installation section of these instructions gives much more details on how to install the required software on your computer, including a very easy way to install the software using a Distribution ("Distro") that installs everything for you at once.
Ordinarily, this should be a dedicated machine that does nothing other than act as your phone system. Although it is possible to run this as a virtual machine, it is not recommended for production systems. Typically this is a physical machine sitting on the same LAN as your phones.
A VOIP PBX and its phones are all connected together using a standard ethernet computer network. If you don't have a ethernet network jack in each location, you can try using Powerline Ethernet Adaptors like the ones made by Xyxel or Netgear. Don't confuse Powerline Ethernet Adaptors (which let you use powerlines for ethernet) with Power Over Ethernet ("POE") (which allows you to power your SIP telephones using a single ethernet cable that carries both power and data).
Obviously without phones, a PBX is not going to be able to do a whole lot. You can buy actual telephones that connect to a computer network (IP Phones), or you can buy adaptors that allow you to connect regular phones to your computer network (ATA Adaptors), or you can even use software running on your computer or other portable device to make it act as a phone (softphone).
- IP Phones: IP phones are by far the best way to go when setting up a FreePBX-based system. They typically offer programmable buttons that make using various features easy (compared to dialing star codes, like *57). Most have multiple lines, which allow you to very easily manage more than one call to your extension. There are many manufacturers that make IP phones, and many many models that range in price from $80 up to $500. Within a single deployment, it's good to standardize on one line of products simply for end user ease-of-use, but of course you can mix and match all you like.
IP Phones connect to your network using an ethernet jack. Commonly used IP phones are made by Aastra, Polycom, and Yealink. One of the most popular phones used today with FreePBX installations is the Aastra 6757i.
- Regular/Analog Phones: Analog phones are the regular phones that you can plug into your phone line at home and just use. There are many ways to connect these to a FreePBX system. There are several manufacturers (such as Digium, Pika, Rhino, and Sangoma) that make PCI cards that will interface with Asterisk. These provide "FXS ports" which you can plug an analog phone into.
Another way is to connect analog phones is with an ATA (analog telephone adapter), which plugs into a network jack. They have an ethernet port, and one or more telephone (FXS) ports. They talk over ethernet back to your FreePBX system, and as far as FreePBX is concerned, they appear just like any other IP phone. The benefit to these devices is you can locate them closer to the phone, and just use your ethernet network instead of running analog wiring to the phone. The most common ATAs are made by Obihai (OBI 100 and OBI 110) and Grandstream (the HT-286 and HT-503).
- Softphones: This is software that you install on to your PC, that talks back to Asterisk, and appears just like any other IP phone. You need a microphone and speakers of some sort (headset, usb device) to actually use it to place calls. There are many different softphones available for most platforms. They are useful for testing and connectivity while on the road (eg, on a laptop), but most people do not use them as a primary device because you're relying on a PC working, being turned on, user logged in, etc.
Like phones, there are many ways to interface to the rest of the world, i.e. the Public Switched Telephone Network ("PSTN"). A PSTN interface is a way to connect regular telephone lines to your PBX.
- POTS: Plain old telephone service. This is the type you have at home, it is an analog service and (in North America) is provided to you via an RJ11 jack. This supports one call (one channel) at a time, and is the most basic service. Generally each POTS line gets its own public phone number.
- PRI: Primary Rate Interface. This is a digital line that carries 23 64kbps voice (B) channels, and one 64kbps signaling (D) channel used for call setup, caller id, etc. You can have zero up to hundreds of incoming DIDs ("direct inward dial" - an old telephony term that refers to a public phone number) on a PRI. It is the best interface to use when dealing with several lines.
- ISDN BRI: Basic Rate Interface. This is a digital line carrying two 64kbps voice (B) channels and one 16kbps signaling (D) channel. It is not widely used with Asterisk systems (mostly due to the high price compared to POTS).
- T1: Similar to a PRI line, it has 24 64kbps channels (though sometimes 56kbps), and signaling is done individually on each channel. There are many different configurations for T1s, and generally they are much harder to set up than a PRI.
There are many ways to connect all these interfaces to Asterisk:
- PCI cards: There are several manufacturers (such as Digium, Pika, Rhino, and Sangoma) that make PCI cards that will interface with Asterisk. For analog lines, you need cards with fxo ports (note: most cards have the ability to have a mix of fxo and fxs ports). For digital lines, you can get cards with single ports, and cards with 4 ports (supporting a total of 4*23 = 92 channels, with PRI).
- IP Gateways: These are similar to the ATA's described above, but have one or more FXO ports that you plug your telephone line into. You can also get gateways with digital ports. These are made by many companies, including Grandstream, Audiocodes, etc.
VoIP PSTN Interface
Using a Voice over IP provider is another way to get connected to the PSTN. Most businesses do NOT use VoIP as their primary connection because it's unreliable compared to direct PSTN connections. It's susceptible to other internet traffic hogging bandwidth, and there are more points of failure (your ISP, your provider, your provider's ISP, and everyone else in between).
The provider will have PRI/T1 lines, and some kind of hardware and/or software that provides it to you as SIP or IAX2 (some providers even use Asterisk for this). There are all sorts of business models around this, but typically:
- Flat-rate account: You pay a flat rate, and get some number of minutes that you are allowed to use. Usually with these accounts you get one DID (phone number) and can use one or two channels (simultaneous calls) at a time. Some of these providers lock you into using their hardware (they provide you a box that you can plug an analog phone into), so beware: you'll need some kind of fxo hardware to interface to this box (plus you lose quality by converting to analog in between, possibly introduce echo, etc). Having Asterisk talk SIP or IAX2 directly to the provider is always preferable.
- Per-minute account: This is also sometimes marketed as "wholesale" VoIP. You pay per-minute, for all calls (local and long-distance, incoming and outgoing), usually around $0.01-$0.03/minute, depending on volume. Most providers will give you around four channels, but usually more if you ask (sometimes for a fee). You can get this service for origination (outbound) only, or you can get one or more DIDs for termination (incoming) calls. Typically you pay $3-5/month per DID, and most providers can get DIDs from anywhere in your country (or elsewhere).