Lately, my boss has been toying with the idea of setting up and venturing into the possibility of setting up our own VOIP phone system PBX with handsfree sets, SIP trunk, etc-etc-etc.
My first response was - where can I find the time to figure this out??
Thankfully, the steps aren't that difficult!
The process, well, summary of it anyway, would be:
- you need a PABX server.
- you need a SIP Trunk from an ISP
- you need soft-phones - apps basically
- you need a good head-set
I am not talking about pulling ISDN line in, and getting 30 voice direct lines frm Singtel.
What we're hoping to achieve is to ride on the existing stable Singtel Evolve/ELITE, any other ISP Fiber broadband plans that we can utilize for voice, since voice call uses significantly lower bandwidth than... say- youtube!
As such, we decided to go with the easiest to set-up, and most cost effective. Here is our plan.
- Set-up a new hyper-v host (Windows server 2012r2), we use trial version first... on a spare-old-server, with 1-TB of RAID-1 Storage array.
- Download and set-up FreePBX virtual machine (we used freePbx server with the CentOS 5.2 core, but in a virtual box vdi format.
- We set-up the virtual machine in VirtualBox 5.2, and get it to work.
- meaning, we configured network, configured the phone system, configured the settings, and -
- tested the call with a trial SIP trunk from the States.
- we tried calling one another internally using our computers and mobile-phone using the Zoiper client
- After proven to work, we proceed with the conversion of the VDI virtualbox image that has been configured-and-tested, to a VHD format.
- Then, we proceed with the set-up of the VHD on our Windows Server 2012r2 Machine. Note, we used a HP Proliant ML150G6 server for this purpose. The server is about 6 years old, but it works, and the VM utilizes only about 2-3-GB of memory (max), and 10-GB of disk space.
- Note that FreePBX actually do not support the configuration and running of their server in a Virtual Machine, on Hyper-V. Note here -
- http://community.freepbx.org/t/x64-distro-on-hyper-v/16296
- And there's also issues with FreePBX running on hyper-v with poor line quality... note -
- http://community.freepbx.org/t/poor-call-quality-packet-loss-jitter-on-hyperv-machine/21360/4
- As such, we ought to rely only on the main network adapter and not the legacy network adapter
- But we the IT Pros are all in the business making things happen, so in the spirit of that, we tried and we did.
- There is a post in note-6 that a few people manage to get the set-up to work. Here is a summary:
- Set-up the Hyper-V VM with a legacy network adapter (more details here if you need pictures)
- Remove any existing network adapter in the hyper-v manager settings for the VM
- ensure that the legacy network adapter is set as disconnected for now. (not connected to any network)
- Load the ISO file for Microsoft Linux Integration Toolkit - at the point of writing, i used 4.1, for Cent OS 5.2
- Start the VM, Login as root, mount the DVD/CD-Rom device, go to the relevant OS folder, and .\install.sh
- Once the integration services and drivers are installed, we are in business, and we can proceed to shut-down the machine.
- Proceed on next to remove the legacy network adapter in Hyper-V, and install the standard Hyper-V network adapter.
- Note the MAC Address, and set the connection to your LAN.
- The VM will boot, and if you're like my situation, the network would not work because of the changes of network interface adapter and the issues with the start-up/enable of the adapter.
- Based on this link here the issue is related to the choice of network settings and adapter to start.
- Basically - Cent OS will start up the relevant network adapter with the required settings like IP/SM/GW from the start-up scripts.
- Since the FreePBX VM was originally set-up in virtual-box, we had to re-configure the start-up script as the network interface card has been changed from eth0 to eth2 (in our case).
- using the command "ifconfig" will tell us what is the name of the current enabled network adapter.
- if there's no eth(number) available, it means that you need to 'turn-on' the adapter by ifconfig eth(number) up and this command will bring-up the network interface adapter.
- next, go to the following location
/etc/sysconfig/network-scripts
and look at the adapters available. - I had these adapters, and I have
ifcfg-eth0
and I noticed that eth0 is no longer available in my step-3 above while running ifconfig. But, I did have eth0, and i do not have any ifcfg-eth2 file. - As such, I proceed with my vi editor to check the settings for ifcfg-eth0, make the necessary network address amendments (if there is any), and save it.
- Next, I cheated by renaming the ifcfg-eth0 to ifcfg-eth2 (since eth0 is no longer in use/not available). - rename files in Linux using "mv" command.
- Reboot the VM.
- The VM is now accessible on the local network
- We proceed with the set-up and application of the SIP trunk from MyRepublic, they are one of the more affordable options down here in Singapore.
- We used our existing fiber broadband line, thank God we have 1x Static IP address (dynamic works too by the way.. just need a Dynamic DNS provider like dyndns.org or noip.com)
- We performed the necessary port forwarding (NAT) on our firewall (Sonicwall)
- Installed Zoiper on our client computer and devices
- We are now... in Business!
I will update with more details as we go along. But thus far, this is a summary that I am hoping that we can refer to in future, and for the community out there to benefit from realizing how fast/reliable our Singapore Fiber Broadband network is.
If we can save more money with it... and change our 15-20year old PBX or Key-phone systems.... why not? :)