Note: This post has been updated with a new FreePBX in a Cloud instance for Europe.
Our two-part tutorial explaining how to use VoIP (Part 1) and Asterisk (Part 2) in Amazon’s Elastic Compute Cloud (EC2) has garnered quite a bit of attention. But due to the time required to complete the many steps needed to get up and running, some of you have asked if it is possible to create a much simpler to install “pre-built” Asterisk EC2 “instance.”
In short, yes it is. And we’ve done just that for you.
With the power of the cloud, it’s not necessary have to wait days or hours for servers to be rebuilt. We don’t even need to start with a server that has nothing more than an operating system on it. Someone (Voxillans) can do all the grunt work: building, compiling, installing software; then share the complete server with others (you). Amazon calls this sharing Amazon Machine Images (AMIs).
Now you have two choices, you can either build the Asterisk server yourself by following all the steps as listed in Part 2: Asterisk in a Cloud. Or you can use Voxilla’s pre-built image to eliminate a lot of the heavy lifting.
If you want to use the pre-built Asterisk image, go to the Asterisk in a Cloud tutorial and:
- Follow steps 1 through 4;
- In step 5, after selecting your region, do the following:
- Select the AMIs and Instances tab in Elasticfox;
- In the Machine Images (AMIs) box, type voxilla into the search box in the upper right corner;
- Look in the Manifest column and select the row appropriate to your location. For the United States, select voxilla/asterisk-188.8.131.52-i386.manifest.xml. For Europe, select eu-voxilla/asterisk-184.108.40.206-i386.manifest.xml. You can click on the Manifest header to display the names in alphabetical order.
- Click the green power button to launch the instance. A new window will appear;
- Set the Instance Type to m1.small (Amazon’s smallest and most affordable instance);
- Make sure the KeyPair drop-down is set to ec2-keypair;
- Set the instance to launch in the Asterisk security group;
- When your settings look like the image above, click Launch.
Your new instance will appear in the Your Instances section at the bottom of the AMIs and Instances tab in Elasticfox. You will notice that the initial state of your instance is pending. It will take 30 seconds to 5 minutes for an instance to start. You can click the blue refresh button in the Your Instances section to refresh the status.
You can check on the status by looking at the State column, the state will change to running when your instance starts. The Public DNS and Private DNS columns will also contain values. Your running instance entry should look something like the image below.
- If you want to assign an elastic IP address to the server, follow step 6. Note that the server is configured to use STUN every hour to determine its public IP address, when you change the instance IP address to the elastic IP address, reload the sip module to tell Asterisk to update the external IP address;
- Follow the first part of step 7, Connecting to an EC2 instance, then skip the rest of step 7 and all of step 8;
- If you want to use Elastic Block Store (EBS), stop the Asterisk server by running /etc/init.d/asterisk stop on the instance command line, then follow step 9 and step 10.
These instructions should get you up and running in less than hour (or about 10 cents on the AWS cloud meter).
If you need help with the AMI or Asterisk in the cloud, technical help is available from the Voxilla Forums.