Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Welcome!
Assumptions
Requirements
Getting Started
A successful deployment of Asterisk on EC2 requires that you enable three critical ports on EC2's
firewall. Without them, Asterisk will not work. Thus, the following ports are key to passing RTP packets
(for voice) and SIP signaling (for devices, DTMF codes, etc.):
• 5060 (UDP)
• 4569 (UDP)
• 10000-20000 (UDP)
• 22 (TCP) (You'll need this for SSH access)
CloudCrunch How-to: Amazon EC2 and Asterisk PBX. Copyright 2008 CloudCrunch and Ronald Lewis.
CloudCrunch How-to: Asterisk PBX and Amazon EC2 (PREVIEW)
Author: Ronald Lewis, CloudCrunch
Released: TBA
Now that you've enabled the ports necessary for Asterisk to function, it's time to launch an instance! We'll
use Eric Hammond's Ubuntu AMI (Amazon Machine Image), ami-ce44a1a7, and the 1000HZ AKI,
aki-9b00e5f2. This AKI is important because it is specifically compiled for VoIP applications such as
Asterisk. Any AKI (Amazon Kernel Image) other than one set at 1000HZ will produce undesirable
results in voice quality and functionality.
We've added the necessary ports and launched the image used for this guide. Now, it's time to compile a
few components which are necessary to build Asterisk. Why compile the source code of Asterisk? It's
great practice to learn how to independently create the bits for the world's best open source PBX! It's
painless!
Getting closer!
Let's proceed to download Asterisk's source code, shall we? At the command line, enter the following:
: cd /mnt
: mkdir source
CloudCrunch How-to: Amazon EC2 and Asterisk PBX. Copyright 2008 CloudCrunch and Ronald Lewis.
CloudCrunch How-to: Asterisk PBX and Amazon EC2 (PREVIEW)
Author: Ronald Lewis, CloudCrunch
Released: TBA
: cd source
: cd asterisk
: ./configure
: cd /mnt
> *down arrow* to option 12 > *down arrow* to option 4 > clear option with *space bar* >
*up arrow* to option 1 > select option with *space bar*
Asterisk is now configured for showtime! Now, let's compile the bits for a great piece of software. At the
command prompt, enter the following:
: make install
: make samples
CloudCrunch How-to: Amazon EC2 and Asterisk PBX. Copyright 2008 CloudCrunch and Ronald Lewis.
CloudCrunch How-to: Asterisk PBX and Amazon EC2 (PREVIEW)
Author: Ronald Lewis, CloudCrunch
Released: TBA
We've reached the finish line! You've just prepared, configured and compiled
your very own world-class PBX "in the cloud" on Amazon EC2. Now, let's
configure our dialplan and soft phone for testing.
: cd /etc/asterisk
: nano sip.conf
Add the following to the END of the sip.conf configuration file (we'll use this with our
softphone to test the configuration)
[1234]
type=friend
callerid="Asterisk" <1234>
host=dynamic
canreinvite=no
secret=1234
dtmfmode=rfc2833
context=default
qualify=yes (IMPORTANT -- Our softphone WILL NOT work without this designation)
EDIT EXTENSIONS.CONF
CloudCrunch How-to: Amazon EC2 and Asterisk PBX. Copyright 2008 CloudCrunch and Ronald Lewis.
CloudCrunch How-to: Asterisk PBX and Amazon EC2 (PREVIEW)
Author: Ronald Lewis, CloudCrunch
Released: TBA
: nano extensions.conf
+++ extensions.conf is the 'traffic manager' of Asterisk. Here, you'll define Asterisk handles
extensions, phone numbers, voicemail and more.
Add the following to the END of extensions.conf (this will test the dial plan and see if we have audio)
Start Asterisk
: asterisk
: asterisk -r
Configure X-Lite
(add screenshots of configuring X-Lite)
username: 1234
password: 1234
authorization name: 1234
domain: <EC2 INSTANCE PUBLIC IP>
IMPORTANT!
• 'Register with domain' should be CHECKED
• 'Send outbound via' <DOMAIN> should CHECKED
• Be sure to 'enable' your SIP account
1. Open X-Lite
2. Enter '*98'
3. Click 'Send'
You should be greeted with the Asterisk Voicemail System ('Comedian Mail').
CloudCrunch How-to: Amazon EC2 and Asterisk PBX. Copyright 2008 CloudCrunch and Ronald Lewis.
CloudCrunch How-to: Asterisk PBX and Amazon EC2 (PREVIEW)
Author: Ronald Lewis, CloudCrunch
Released: TBA
CloudCrunch How-to: Amazon EC2 and Asterisk PBX. Copyright 2008 CloudCrunch and Ronald Lewis.