This is probably the only area that I can call myself an expert in.
Asterisk can be made to build a tricked out phone system of any size at a trivial cost.
Ultimately, this page will be a set of config files, patches and dependencies for building such a system.
Current version doesn't do GSM. Mainly because I have no idea how to do it.
The only thing on here that's going to be non-obvious to the person familiar to Asterisk is the MELP stuff. Basically MELP is a 2400bps codec. It's very similar to LPC10 except you don't sound like a robot. The quality is pretty good. I wouldn't mind using it for all of my calls. Using MELP with IAX2 makes for a very low bandwidth channel. In trunking mode, IAX2 only has protocol overhead on the first 1 or 2 calls. After that, it starts to become trivial. Since LPC10 and MELP are so similar in structure, Asterisk can be tricked into thinking that MELP is actually LPC10. Using the reference code, I've gotten a codec_melp to load, but it just crashes. Unfortunately, this isn't an ultimate solution because the code I did (making the reference code reentrant) can't be released into the wild. That would be beyond "purely philosophical" inquiry and Compandent (the patent holder) could sue me into oblivion. Fortunately, they sell serial modules that can do multiple MELP channels.
Why all the trouble with MELP?
Without MELP, there are other options.
- LPC10 - Problem: makes you sound like a robot... it's pretty scary
- g723.1 (still using VoIP) - Problem: doubles the amount of bandwidth needed
- HF phone relay - Problem: bad sound quality
- Satellite phone - Problem: expensive, quality not as good, annoying latency
- MELP/MELPe - Military grade compression for minimizing bandwidth consumption
- AMRNB - What cellphones use
- g723.1/g729 - What voip phones use
- iLBC/speex - Open source low-bitrate codecs
- Bluetooth will be implemented via chan-mobile
- GSM will be implemented with a commercial gateway.
- Regular POTS service can be done using hardware
- SIP - VoIP protocol
- IAX2 - Lightweight VoIP protocol - good jitterbuffer that can be tweaked for dealing with packet loss/latency
- At least a P4 2.4 2GB server with a focus on reliability (solid disk, passive cooling if possible) $1000
- Backup server/load balancer $1000
- Half decent switch $300
- Digium AEX2460E Analog Card 6x4 FXS + Echo can $1800
- g729 licenses $100
- 20U Rack $500
- Rackmount UPS $500
- Two serial MELPe hardware modules $1000 (This could be way off)
- Far end server colocation $400/month
- Total: $6200
- Recurring: $400 per month plus cost of minutes
- Doesn't include wiring because that depends entirely on the layout of the structure.
- Amplifiers will be necessary in some situations.
This scheme supports 24 POTS lines. One could fit 3 or 4 of those cards in each server, so it scales pretty well.
Obviously, the rack and UPS can be avoided if space is already provided by existing infrastructure. I leave it in here for the purpose of offering a complete solution.
- Existing network/Internet
- Cool/dry/secure area
- ~1000 watts available power
- Used to switch calls
- Used to translate between various protocols
- Used to perform IVR functionality such as voicemail
- Faxing: Even with T.38 (Fax over IP), 14400bps are needed. It's not clear that this will always be available. Store-and-forward should be used to fall back on when network conditions are poor. Regular T.30 fax will work fine internally. Externally, it is absolutely 100% completely impossible to get regular faxing to work.
- SMS works with a properly installed chan_mobile
- Video will only be possible internally
- Voicemail is trivial to setup with Asterisk. Usually works out of the box with chosen provisioning software.
- Intercom - chan_alsa provides the ability to dial the sound card. "HI. I'M GEORGE ZIMMER, FOUNDER AND CEO OF THE MEN'S WAREHOUSE..."
For external communication, I think the phone system should try this sequence...
- Any good opportunistic bandwidth ('stead is in port and has access to wifi)
- Packet HF - so that it gets low latency bandwidth if possible
- Analog HF channel for emergency backup
I could use some good advice here from a networking guru.
- IAX2 has an aes128 option
- Bluetooth (cough) security
- VoIP security not all that great in the open source world, but reasonable security can be achieved.
- Build servers. Insert Digium card/s.
- Load the ups/servers/patch panels into the rack.
- Connect power; connect servers to switch
- Load Debian or Ubuntu Server onto the servers.
- See Software Installation Procecure below...
- Install your favorite billing/provisioning software - I leave this open since there's a bazillion ways to do it.
- Connect the system to the LAN/WAN
- Order a dedicated server, nothing special.
- Install Debian, then Asterisk, like we did before
- Follow these instructions to connect to the colo server
- Subscribe to server per minute voip providers and configure them on the dedicated server
- Create dialplan