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.


Installing Local SIP Server for Interphone Function


Please follow the following steps


Step 1: Downloads

  1. Download the .iso disk image for the FreePBX Asterisk installation from https://www.freepbx.org/downloads/.
  2. A file called "SNG7-FPBX-64bit-xxxx-2.iso" or similar will start downloading.
  3. Download Virtual Box installer from https://www.virtualbox.org/
  4. Launch the installer and follow on-screen instructions 


Step 2: Create a virtual machine in VirtualBox

  1. Open VirtualBox software, click New and select options shown. Name and location of VM can be of your choosing.
  2. Set the Type to Linux and Version to "Other Linux (64-bit)"
  3. Set "1024 MB" of RAM. 
  4. Stick to the default option of "Create a virtual hard disk now"
  5. Stick to the default option of "VDI"
  6. Stick to the default option of "Dynamically Allocated"
  7. Choose the file size of the VM. It’s 10GB 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.
  1. Click Create. You will end up here:


Step 3:  Install FreePBX Asterisk Server

  1. Select the virtual machine you just created in the VirtualBox Manager GUI.
  2. Click Start. You will see this window prompting selection of a startup-up disk. Navigate to "SNG7-FPBX-64bit-xxxx-2.iso" on your PC and click Start
  1. On the next screen, press enter to select the default option.
  1. On the next screen, press enter to select the default option. Repeat for next screen.
  1. The screen will change to a command line installation. Eventually it will switch to this graphical UI and will continue to install packages. This can take a while and no action is required. 
  1. While installation is ongoing,you can set the root password ahead. Make a note of this password, if you lose it you cannot complete the set-up process! When the installation is complete, click Finish Configuration
  1. You will see an option to Reboot. If you click Reboot, it will attempt to re-run the installation process from the ISO file that was loaded in step 1. To stop this, navigate to Devices>Optical Drives and uncheck "SNG7-FPBX-64bit-xxxx-2.iso".  You may  get a dialog saying its unable to eject virtual optical disk. Click on Force Unmount in the dialog.
  1. Now click Reboot.
  1. The virtual machine will boot into a login prompt. Enter the username "root" and press enter. At the Password prompt, type the root password you chose earlier. 
  1. You will now be presented with the FreePBX command line welcome screen and some configuration details including IP address information. The IP address will need to be edited so it is in the same subnet as the physical NIC on host machine which is being used for VoIP. 


Step 4: Configure IP Settings

  1. At the prompt, enter the following command:
nano /etc/sysconfig/network-scripts/ifcfg-eth0
  1. 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= <Set an IP Address> 
GATEWAY= <Your Default Gateway Address> NETMASK= <Your Network Subnet Mask>
  1. Press Ctrl + o to save.
  2. Press enter to confirm file existing name (do not change the filename!)
  3. Press Ctrl + x to exit.
  1. 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 > Close >  "Send the shutdown signal". 
  2. In the Virtual Box Manager UI, select the Asterisk virtual machine and click Settings.
  3. Go to Network and in the Adapter 1 tab change 'Attached to' to 'Bridged'
  4. Change 'Name' to the network interface card on the host machine which is being used for SIP
  5. Click OK to save and exit.
  1. Start the Asterisk SIP Server VM and confirm you can ping the server from the host machine.
  2. 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.

 

Step 5: Login and Configure Extensions

  1. To open the FreePBX web UIE, enter the SIP server’s IP address in a browser.
  2. Configure a username and password and email address for the admin account and click Create Account. This is the email address from which the server would send status messages if enabled.
  1. Login to your account and setup your preferred language. An option to enable a smart firewall may pop up. Click Abort since a firewall is not necessary for our use case. You can now see the FreePBX status page.
  1. Navigate to Applications>Extensions.
  2. Click on Add Extensions and select Add New PJSIP Extension.
  3. Fill in the User Extension, Display Name and Secret (Password) details as required. No other settings need to be changed.
  4. Click Submit and then click the red Apply Config button (in the top right hand corner of the browser). The Apply Config button does a global save on all the settings that have been modified in FreePBX.
  5. Repeat for additional extensions. Make sure to click Apply Config if its visible on the web interface.
  6. Your Asterisk VoIP server is now ready for use. 


Step 6: Configure Interphone settings in BioStation 3

 



Reference:

https://support.biamp.com/General/Networking/Installing_a_virtual_Asterisk_VoIP_server