Difference between revisions of "User:Heath/PBX"

From Seasteading
Jump to: navigation, search
Line 55: Line 55:
* IAX2 has an aes128 option
* IAX2 has an aes128 option
* Bluetooth (cough) security
* Bluetooth (cough) security
* Not all that great in the open source world, but reasonable security can be achieved.
* VoIP security not all that great in the open source world, but reasonable security can be achieved.
== Instructions ==
== Instructions ==

Revision as of 17:21, 31 May 2008

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. Don't know how to do the bluetooth stuff either.

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 Asterisk are so similar, 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.


  • 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

Useful protocols

  • Bluetooth will be implemented via chan_bluetooth or chan_cellphone
  • GSM will be implemented with a commercial gateway.
  • Regular POTS service can be done using hardware
  • SIP - VoIP protocol
  • IAX2 - Lightweight VoIP protocol


  • 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


  • 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.
  • Follow these instructions - Easy if you've done it a few times.
  • Follow these instructions - Have a friend nearby to take your aggression out on.
  • Install my MELPe hacks.
  • Install your favorite billing software
  • Connect the system to the LAN/WAN
  • Order a dedicated server, nothing special.
  • Install Debian, then Asterisk, like we did before
  • Have colo personnel install MELPe hardware, then install MELPe hacks
  • Follow these instructions to connect to the colo server
  • Subscribe to server per minute voip providers and configure them on the dedicated server
  • Connect to them via _X.,1,Dial(sip/myprovider/${EXTEN})

Using a colo is avoidable if enough bandwidth is available. Will TSI one day be the termination point for HF?