Hardware Reference
In-Depth Information
Make Calls with a Raspberry Pi Asterisk
Telephone System
HACK 32
Asterisk is a telephone system in software. It is typically used to bridge
callers together, or offer up features such as voicemail or call queues.
Because it's built totally in software, you can run it on your Raspberry Pi.
Because the Raspberry Pi doesn't have any sort of analog telephone connections,
setting up Asterisk means using a technology called voice over IP (VoIP) to commu-
nicate on the Raspberry Pi. You'll use a computer program called a softphone , to-
gether with a microphone and speakers, to emulate a telephone. The softphone will
then communicate across the network to Asterisk running on the Raspberry Pi.
For more information on Asterisk, check out the Asterisk website or Asterisk: The
Definitive Guide from O'Reilly Media.
Installing Asterisk
Installing Asterisk is fairly simple, as most modern Linux distributions have packages
rebuilt for Asterisk. On Pidora, just run the following command:
$ su -c 'yum install asterisk asterisk-voicemail-plain asterisk-sounds-core-
en-gsm'
Here's the command to run on Raspbian:
$ su -c 'aptitude install asterisk asterisk-config asterisk-core-sounds-en-
gsm'
This will install Asterisk with a basic configuration, common features such as voice-
mail, as well as some sound prompts. Feel free to search your distribution's package
list for additional Asterisk modules.
This hack uses a VoIP protocol called SIP to communicate between one or more soft-
phones and Asterisk. Getting SIP working through a firewall (especially a NAT firewall)
is difficult and beyond the scope of this hack. In order for your connections to work,
you'll need to turn off the firewall, so that it doesn't block connection attempts.
Don't leave your Raspberry Pi connected to the Internet with the firewall disabled,
because someone will likely attempt to try to break into your Raspberry Pi. This is
especially imporant if you haven't changed the password on your Raspberry Pi
from the defaults. We suggest you turn off the firewall on your Raspberry Pi only
long enough to test out things, and then turn it back on.
 
Search WWH ::




Custom Search