FreePBX at Home - Part 4

Final part in the 4-part PBX Series, setting up Zulu for making & receiving calls via PBX on your mobile, even from the other side of the world!

FreePBX at Home - Part 4

Welcome to the final post in the FreePBX at Home series! Check out the other posts if you haven't already!

At this stage in my lab, I have a working FreePBX instance running, with incoming and outgoing calls on Twilio & SignalWire SIP trunks, plus our home analogue PSTN line using the Grandstream HT503 ATA. On my last post, I detailed how to set up a Polycom VVX provisioning server to make bulk changes simple.

Now I have a great system functioning - especially with this 'working from home' situation we find ourselves in - but what happens when restrictions relax and I need to receive and make calls on the go? That's where a soft-phone comes in!

Note: this solution will require a VPN to access your PBX remotely - we won't discuss this in detail but some pointers will be included.

Soft-phone Trials

I have had an in-depth look a few soft-phones on my iPhone & Mac. There are some good examples of open source programs, like Linphone, or some free versions of commercial products, such as Bria Solo Lite. These all come with their own advantages and disadvantages.

Call Notifications

The later version of iOS don't allow apps to run in the background. This is primarily a battery saving technique, so when the app is not on the foreground, it's suspended in the background - so what happens when someone calls your phone? Beep..beep..beep.. (or voicemail if you have set it up!)

This is where push notifications come in.

To receive a push notification to a mobile, it needs to be subscribed to a push notification service. Some apps on the market, like Bria have a very robust push notification service available - but it requires access to the PBX so it can register itself as a client.
This way, when an inbound call is made to your PBX, the PBX tells the Bria service, and it then sends a notification to the phone (in the form of an inbound call).
This will require opening up the PBX to the Bria servers, and allowing access through the firewall. I mentioned in a previous post about not opening up a PBX to the web, so I searched for another alternative.

The SIP server must allow registration from the Bria Push server. If the SIP server is running inside of the restricted network of an organization, the organization must provide access to the Bria Push server and set the SIP Proxy parameter.

Open source programs like Linphone also offer push notifications, but they have the same limitation - needing to directly access the PBX server.

While rummaging online for a solution, I  found a post about Zulu - which I had remembered seeing (and disabling!) in the FreePBX configuration. It is a built-in module with FreePBX, but it isn't free.
Sangoma provide a two user trial for 12 months via the Sangoma Portal (remember I said it's a good idea to activate your FreePBX instance?).

If you decide to try Zulu, I might suggest you order a quantity of 5 or so 'FreePBX Zulu 2-User 1-Year Free License'. It won't give you more users but it might add a few extra years ... sshhh!

As my plan is to have a PBX for home, and I'm the main user, Zulu is an attractive offer. It is also 'per user', not 'per device'. So I can install it on my mobile, iPad, Laptop, Desktop, etc as only one user, allowing me to add a second user if the need arises.

After 'purchasing' a free Zulu license & assigning it to the PBX installation on the Sangoma Portal, visit the System Admin plugin on FreePBX and click Activation on the right side of the page.
Update activation and the Zulu licence should validate.

System Admin Module with Zulu activated

Setting up Zulu on your PBX

Zulu has a pre-requisite: it requires SSL. According to the docs, it doesn't work with self-signed certs. I will put up a separate post on installing SSL certs to FreePBX, but there are two easy ways: Let's Encrypt or your own Cert Authority (CA). It's easy to do both, but using your own CA will give you longer lasting certificates. Let's Encrypt can also be used but needs access to the web via port 80.

As I had an SSL certificate installed, I continued with the Zulu installation!

The first step is to add a user. Admin > User Management. Use the Zulu tab to enable for a chosen user. I had forgotten the password for this account so I reset it before continuing.

Edit user in User Management
Enabling Zulu

Setting up Zulu on your mobile

Next, I installed the Zulu app on my mobile. The instructions should be similar for any Zulu install - which is 'just sign in'. Using the same username & password from above (in the User Management section) and the server address, which might be an IP address or a domain name, log in to the app.

Once the app is installed, you can make & receive calls through your PBX!

VPN for Remote Access

As I am only opening up port 5060 for certain traffic on specified IP addresses (SIP trunk), I use a VPN to ensure that once a push notification arrives, I can access the PBX quickly enough to register the handset and take the call before the person on the other end hangs up.

While I won't cover VPN set-up or use in this tutorial, I think it's worth mentioning Wireguard. It's now built-in to Linux and for me easily out-performs OpenVPN. The installation is easy but it can be a bit tricky to get going - there are loads of great guides out there to help.

Wireguard has an option for 'on demand' VPN. This means (when configured correctly) once I leave home, the VPN will automatically switch on and routes all traffic through the home internet connection. Similarly, when I connect to my network at home again, it switches itself back off. You may choose to have it route traffic towards your DNS or PBX, reducing the load on the carrier and VPN.

Wireguard On-Demand

Push notifications will still be received even if the VPN is off, but calls won't be possible unless the PBX ports (below) are exposed to the web.

Using Zulu

Thankfully when using Zulu the registration process is quick, so hopefully we won't miss many calls!

Call quality using WiFi and 4G has been fantastic so far. I think this is the solution I'm happiest with at the minute. My call billing rates have dropped dramatically & with domestic numbers available for a lot of countries, it's cheaper for others to call us too.

Due to the travel restrictions, I haven't yet tested this solution while roaming. I'd expect carrier traffic management may get in the way and slow things down, but I guess we will see! I'm looking forward to having a really cost effective way to communicate with family while in the USA - call charges of €1.50/min to make a call and €1.00/min to receive a call are obscene.

Improving things

I think the only improvement I could make would be to add a public DNS record and open the ports needed for Zulu. According to the FreePBX Wiki, it's pretty secure - I'm just not sure I want to expose it when the VPN works so well. I guess we'll see when things start to open up again and I get to test it while roaming!


Thanks for reading these posts - hopefully you have enjoyed the FreePBX at Home series (and the other posts for E-Mail and SSL set-up). Please get in touch with suggestions or comments -