Asterisk and Amazon EC2

Given the clear advantages of cloud computing and the industry momentum (slowly) toward VoIP and complementary technologies (think XMPP) I thought it might prove an interesting exercise to install Asterisk on an Amazon EC2 instance.

My preferred operating system is Debian GNU/Linux. Instances are available with Debian (various versions) pre-installed. Theoretically it should be only a few steps to get Asterisk running.

Here’s where reality kick in. Hard. Asterisk has certain features like conferencing that are attractive and in some cases necessary to have. These features require accurate timing as normally provided by hardware except in this case where we actually have a virtual hardware machine with no telephony equipment connected. To provide a timing substitute Zaptel provide the ztdummy kernel driver.

Which means compiling Zaptel against your currently installed Linux kernel. This cannot be done under Debian. The version of the compiler (gcc) is different to that which compiled the kernel. To compile with the correct, older, gcc, you’ll need to boot the OS Amazon used to compile the kernel.

Over to Fedora Core 4 we head. Now, I managed to compile, install and actually run ztdummy on the Amazon developer image, however by this time I’d really had enough. Suffice it to say I was in no mood to start transferring kernel module files across to my Debian instance to pursue the matter.

There are a couple of people who have written up instructions on getting Asterisk to work on EC2. Neither I believe install the ztdummy kernel module. So they are essentially crippled one way or another.

Amazon: If you are listening, let us sysadmins do what we do best. Let us build our O/S including our own Linux kernel! So much time has been wasted due to this restriction!

Advertisements

4 Responses

  1. The Zaptel functionality in Asterisk is for TDM channels. If you’re using EC2 it’s pretty safe to say all your channels are IP based. Are you sure the Zaptel drivers are required for conference calling if your channels are all IP based?

    And on EC2, you can build your own image with your own kernel.

  2. Conference calling is certainly a function that I would consider essential in a commercial installation hence my attempts at installing an Asterisk prerequisite (Zaptel).

    EC2 only permits the loading of authorised Amazon kernels. Currently this means those from Amazon or from Red Hat Enterprise. You could I suppose compile your own, but the Xen boot process as I understand it will only boot an authorised image. I see nothing in recent forum threads or documentation to suggest this has been changed since the article was written.

  3. You can load your own images into Amazon. I currently run asterisk in ec2.

  4. You can but the Xen hypervisor is configured by Amazon to ignore the installed kernel image and boot an Amazon-authorised one. This happens silently.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: