Here it is, a ready to rock AsteriskNow VM for XenServer, ready to download as a .xva file. It includes:

  • CentOS 5.9 (because only 5 is offically supported yet)
  • Asterisk 10 (v10.12.2)
  • FreePBX 2.10 (v2.10.1.9)
  • ARI (Call Recording)
  • Xe-tools (optimized for Xenserver 6.1)

Get a cheap or free SIP Trunk Provider, some Cisco IP Phones or a Siemens Gigaset IP DECT from EBay and you’re done!

I tried a lot of options to build this Appliance like: Installing the AsteriskNow ISO file, isntalling using a install script and even converting VMWare and VirtualBox appliances. All were having problems with the Kernel, booting, Paravirtualization,..etc.

Here are the 10 (+1) steps to build it yourself:

  1. Install the base CentOS 5.9 using the CentOS 5 x64 Template in Xenserver. I did a NetInstall.
  2. Install the Xen PV Tools; Mount the xe-tools ISO, then type:

    mkdir /mnt/cdrom
    mount /dev/xvdd /mnt/cdrom
    /mnt/cdrom/Linux/install.sh
  3. Do all the updates:
    yum update
  4. Install the Asterisk Repository
    rpm -Uvh http://packages.asterisk.org/centos/5/current/x86_64/RPMS/asterisknow-version-2.0.0-4_centos5.noarch.rpm
  5. Install Asterisk
    yum install asterisk asterisk-configs --enablerepo=asterisk-10
  6. Install FreePBXyum install freepbx
  7. Install Asterisk Addons (MySQL for CDR, otherwise CDR/recordings doesn’t work)
    yum install asterisk-addons
  8. Rename some files (otherwise we get some FreepBX notices)
    cd /etc/asterisk
    mv features.conf features.conf.old
    mv iax.conf iax.conf.old
    mv sip_notify.conf sip_notify.conf.old
    mv logger.conf logger.conf.old
  9. Set the file permissions correctly:
    chown -R asterisk.asterisk /var/lib/asterisk/agi-bin/
    chown -R asterisk.asterisk /etc/asterisk
  10. Apply all settings/var/lib/asterisk/bin/retrieve_conf
  11. Load the SIP module (in my case it wasn’t loaded which gave some problems, if it’s already loaded you’ll get an error, which is OK)
    rasterisk
    module load chan_sip.so
    exit

Handy commands to see if everything is running fine
Enter Asterisk Command Line
rasterisk
Display all SIP connections (Trunks + connected Phones)
sip show peers
See if the SIP Trunk is registered
sip show registry
See if CDR is running
cdr show status
Check if the (CDR) MySQL module is loaded
module show like mysql

VM Information and passwords
IP Address: Automatically from DHCP or type ‘setup’ to set a static IP.

Linux root account: root
Password: myphonesvr

FreePBX URL: http:// and click for FreePBX
Username: admin
Password: admin

ARI URL: http:// and click for Recordings
Username: admin
Password: myaripass

MySQL password (used for CDR/recordings)
username: freepbx
password: fpbx

MySQL root password: None, just login from the Linux command line using: ‘mysql -u root’.

Handy FreePBX Modules (install from the FreePBX Webinterface):

  • Ring Groups
  • Follow Me
  • Asterisk Info
  • Asterisk Logfiles
  • Asterisk SIP Settings