Installing a virtual Asterisk VoIP server
- Last updated
-
-
Save as PDF
This article explains how to set up a virtual machine Asterisk-based VoIP server using Sangoma's pre-built 'FreePBX' platform. FreePBX comes with Linux, Asterisk and a web configuration GUI already installed, which greatly simplifies the process of setting up a functional VoIP server. A virtual VoIP server can be extremely useful for training, testing or demonstration purposes.
Please note: if you decide to use an existing complete virtual machine rather than download and install the latest version of FreePBX as instructed below, you may not be running the latest software. Your system may therefore not include the new features, bug fixes or security patches. It is possible to update from within an existing installation but this is outside the scope of this article – please consult the FreePBX wiki for more information.
Downloads
- Download the .iso disk image for the FreePBX Asterisk installation from https://www.freepbx.org/downloads/.
- A file called "SNG7-FPBX-64bit-xxxx-2.iso" or similar will start downloading.
- Download Virtual Box installer from https://www.virtualbox.org/
- Launch the installer and follow on-screen instructions
Create a virtual machine in VirtualBox
- Open VirtualBox software, click New and select options shown. Name and location of VM can be of your choosing.
- In the next step, stick to the default option of "512 MB" of RAM.
- In the next step, stick to the default option of "Create a virtual hard disk now"
- In the next step, stick to the default option of "VDI"
- In the next step, stick to the default option of "Dynamically Allocated"
- In the next step, you can choose the file size of the VM. It’s 8GB by default which is a good option to keep. Because we chose dynamically allocated in the previous step, it won't use all of the allocated memory unless required
|
|
- Click Create. You will end up here:
|
|
Install FreePBX Asterisk Server
Configure IP settings
- At the prompt, enter the following command:
|
nano /etc/sysconfig/network-scripts/ifcfg-eth0
|
- You will be presented with a text editor with the Network configuration. Change or add following parameters in the text editor. Do not change other parameters.
|
BOOTPROTO="none"
IPADDR= <Your IP Address>
GATEWAY= <Your Default Gateway Address>
NETMASK= <Your Network Subnet Mask>
|
- Press Ctrl+o to save.
- Press enter to confirm file existing name (do not change the filename!)
- Press Ctrl+x to exit.
|
|
- The network interface of the VM now needs to be set to bridged mode so that the Asterisk VM can communicate with devices external to the host machine. Shut down the VM by using File -> "Send the shutdown signal".
- In the Virtual Box Manager UI, select the Asterisk virtual machine and click Settings.
- Go to Network and in the Adapter 1 tab change 'Attached to' to 'Bridged'
- Change 'Name' to the network interface card on the host machine which is being used for VoIP
- Click OK to save and exit.
|
|
- Start the Asterisk VoIP Server VM and confirm you can ping the server from the host machine.
- Note that in bridged mode to ping the Asterisk VM from the host machine the physical bridged network adapter needs to be 'up'. It will therefore need to be plugged into an powered-on switch or other network port e.g. a Tesira Forte or SVC-2 card.
|
|