[How-to] Install Freepbx distro (with commercial modules) on Google (cloud) Compute Engine

I was able to run FreePBX distro on the Google Cloud platform. For anyone who likes to do so, see my steps.

  • Download FreePBX from https://www.freepbx.org/downloads/freepbx-distro/
  • Download and install VirtualBox https://www.virtualbox.org/wiki/Downloads
  • Create new virtual Machine:
    • Name:
    • Type: Linux
    • Version: Other Linux (64 bit)
  • Set memory
  • Create virtual hard drive now
  • VDI
  • Dynamically allocated
  • Set the size (at least 20 G)
  • Select the VM and click start
  • Select (attach) the iso and click start
  • Set the configuration, (or Enter, Enter, Enter)
  • Wait for the installation to finish (also may set the root password while the installation is running)
  • Reboot
  • (I can to shut the machine again)
  • While VM is selected and Powered Off go to setting > Storage and release the iso
  • In Network select Enable Network Adapter > attach to Bridged Adapter, Click OK
  • Start the machine (keep it running)
  • Go to Google cloud platform > Compute Engine > VM instances > Click Import VM
  • Click CloudEndure
  • Create a new Project (follow the instruction)
  • Pick a region based on your latency to GCP regions: http://www.gcping.com
  • In the VM type: wget -O ./installer_linux.py https://gcp.cloudendure.com /installer_linux.py; then sudo python ./installer_linux.py -t (token)
  • Keep it running until done :coffee:
  • In https://gcp.cloudendure.com LUNCH TARGET MACHINES > Test Mode. May take several minutes for conversion to be finished
  • Give it some time you may see several VM instances run the one with “freepbx-sangoma-local” in the name. Make sure that SSH is working

From http://www.dslreports.com/forum/r31813676-Almost-free-PBX-in-the-Google-Cloud

Go to VPC network > Firewall rules, click Create Firewall Rule.
Give it a name e.g. sip. Under Target tags, type a tag name, e.g. sip.
Under Specified protocols and ports enter “udp:5060; udp:5160; udp:10000-20000” (without the quotes and assuming default FreePBX settings). Under Source IP ranges, enter 0.0.0.0/0 (or a restricted range if desired), then click Save.
You may want to restrict the “default-allow-http” firewall rule to your IP address as well
Go to VPC network > External IP addresses. For your instance, change the Type from Ephemeral to Static. Give it a name, e.g. mypbx. Click RESERVE.
Go back to Compute Engine > VM instances. Select your instance, click EDIT. Under Network tags add sip or whatever tag you chose above. Click Save.

  • Create a snapshot
    Done
2 Likes

Maybe you should reflect the title to match the post, otherwise people just think you have a question about commercial modules with FreePBX.

Thank for the tip. Hope will help someone

If someone had a chance to try this I appreciate feedback to improve this setup. Google provides $300 credit anyway.

My issue is that the phones will stop registering from time to time without me changing anything in the setting. I did white list my location IP and the SIP trunking IP addresses. I have a static IP address for the FreePBX.

Any thoughts?

***I restarted the phones and the PBX and they seem to be working now. I will keep testing ***

So basically your PBX is behind NAT and you’re phones are behind NAT. You have two endpoints trying to connect to each other over the public Internet with NAT on both sides. You have this configured correctly on both ends?

The PBX is setup to show it is behind NAT? Has all the proper information for local networks, external IPs, etc? The extensions are setup to show they are also behind NAT? Since the default config assumes the PBX and phones are on the same LAN so they aren’t setup as being behind NAT by default.

All this has been done?

I was able to register the phones and make calls but it will loss service after a day.

  • On the PBX Firewall >> Networks: I added my IP address and the SIP trunking address to the Trusted Zone.
  • Asterisk SIP Settings >> NAT Settings >> External IP was defined
  • Additionally, on System Admin >> Intrusion Detection: I Whitelisted the same IP address.

I did not do much on the actual phones on site.

Any suggestion?

Well this is a NAT issue. You should fix that and have things setup properly. When you reboot the phones, they are refreshing and resetting their NAT in the firewall/route which makes them show up as “Available” in the system.

I recognize that there is Network issue, other what I did above. Any suggestions?

This isn’t a “network” issue, it’s all in how you’ve got your NAT set up and both ends, as well as the routers and firewall configurations in between.

I think that was oversimplifying the term.

  • Anything else you suggest on the FreePBX side?
  • I have two phones one Polycom VVX and another is Yealink

What driver are these extensions using? Chan_SIP or Chan_PJSIP? If Chan_SIP then under the Advanced tab you need to set the NAT option to Yes. If Chan_PSJIP, it’s NAT aware and will deal with it.

What type of router is in front of these phones?

Thank you, Tom.

I usually create the extension as Chan_SIP but later I change it to pjsip under the advanced tab. In the extension type, it shows pjsip.

I use WAC510 https://www.netgear.com/support/product/WAC510.aspx as access point and router.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.