Asterisk on the Cloud With a Click

Note: This post has been updated with a new FreePBX in a Cloud instance for Europe.

Amazon Web Services
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:
    1. Select the AMIs and Instances tab in Elasticfox;
    2. In the Machine Images (AMIs) box, type voxilla into the search box in the upper right corner; 

      Select Voxilla AMI

      Select Voxilla AMI

    3. Look in the Manifest column and select the row appropriate to your location. For the United States, select voxilla/asterisk-1.6.0.5-i386.manifest.xml. For Europe, select eu-voxilla/asterisk-1.6.0.5-i386.manifest.xml. You can click on the Manifest header to display the names in alphabetical order.
    4. Click the green power button to launch the instance.  A new window will appear;
    5. Set the Instance Type to m1.small (Amazon’s smallest and most affordable instance);
    6. Make sure the KeyPair drop-down is set to ec2-keypair;
    7. Set the instance to launch in the Asterisk security group; 

      Launch AMI

      Launch AMI

    8. 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.

     

    Your instances

    Your instances

  • 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.

Be Sociable, Share!
  • now, all we need is a pre-built FREEPBX on top of this … to save even more time!!
    any volunteers?

  • Asterisk & Freepbx should both have a pre-built installs.

    The ability to have a box ‘just power on’, no need to install and configure, just restore from a backup and your PBX is ready to go… I like that idea.

    Looking forward to when Amazon adds an Australian data centre to the cloud, then us Aussies can start to also play in this field. – hopefully we don’t have to wait too long.

    Clint Davis
    CEO, Greymouse Teleconference
    http://teleconference.greymouse.com.au

  • Great work!

    For those looking for FreePBX, you can find it on the cloud on ami-2ec62147.

    Nauman

  • Hi

    Are there any benchmarks on reliabilty and performance for running Asterisk in the cloud ? What sort of call volume can it support ?

    Ian