Networking - can't register and Docker issues

Hello, few days ago I started testing FreePBX. I managed to install some debian rpm version on my OrangePi Zero and it worked nice, but only in local network. The extensions registered and local calls were possible. When I tried to expose the ports, despite FreePBX recognized the external IP, I couldn’t register any extension. I know the ports are opened, because experimentally I also exposed admin freepbx on port 80 and it was visible.
The ports range is for sure correct. Does anyone know how should I configure FreePBX to be able to register from the outside?
And another problem: After I installed the rpm version I had to remove it. Then I ran FreePBX in docker container. In local LAN I can register extensions, but when I try to connect, the server shows its docker networking address and some extensions reject the connections. Also no sound is heard, only voicemail works. Do you maybe know how to set FreePBX to introduce itself as external address?

Search these fora for the general feelings about running FreePBX in docker (they mostly suggest ‘just don’t bother’) mostly for the reasons you are experiencing)

1 Like

What is your goal? If you just want a PBX for your small business, it’s easiest to use the Distro; see

You can install it on a cloud server, for example at Vultr, on a virtual machine (VirtualBox, VMWare and Hyper-V are all fine), or on an old PC. On a VM, you should use bridged networking.

If the Distro doesn’t meet your needs, please explain your requirements in detail.

If you want FreePBX in a container, it is well suggested that you use LXD/LXC not docker, that way you could use the ‘Distro’ with a bit of work.

Well, my requirements are quite low. I just want to have few phones connected in different localizations to have free phone system. Just simple family/friends small network.
I am afraid that distro is too much for me. Mostly because of ARM architecture and lack of image for my single board computer.
I read a few remarks about docker freepbx image and they really weren’t too flattering :wink:
Do you suggest I should give away the docker and install this rpm package again? Or compile it from sources (preferably not?)

rpm’s are not easily compatible with Raspberries, you could waste hours with 'alien ’ though.

A ballsy PI could get LXD going there though, then you could have a Redhat VM to try installing using the wiki recipes

Allright, I managed to run distro on virtualbox. The local extensions work and I can call.
But still I’ve got problem with registering from external network, despite I forwarded ports. Should I configure anything else to allow calling from the external IPs?

Does anything appear in the Asterisk log when the external device attempts to register? If so, post an example, including SIP trace (pjsip logger or sip debug, according to channel driver used).

If not, do the registration attempts appear in sngrep? If so, they are being blocked by FreePBX Firewall. Mark the external IP address as Trusted, or (as a test) turn off the firewall.

If nothing in sngrep either, post details about the network at both ends, including ISP, modem make/model, separate router/firewall (if any).

The VirtualBox network interface needs to be bridged or you have the good old double nat problem

1 Like

What @dicko said. Avoid another NAT and set the interface to bridge. Then you need to port-forward the SIP port and RTP range in your router/firewall at home.

I did it from the start, the vm is bridged.
I suspect that it may be problem with ISP blocking packets. But I will try to dump the data from logs and we’ll see.
My router/modem is fibreoptic Huawei HS8145v., my ISP is local company from Poland, SkyNet.

Allright, I contacted with my ISP and they say that no packets are blocked. So I suspect something is wrong with my configuration of SIP.
What exactly should I set/write in this tab?


Also - how can I check if my udp ports are opened?

Nothing technical if your phones are re3gistering to UDP:26099.

I would suggest sngrep to sniff any trace of such attempts.

In Asterisk SIP Settings (on the General tab), confirm that External Address and Local Networks are correctly set. If you change these, after Submit and Apply Config you must restart Asterisk.

In the ONT, Forward Rules → Port Mapping Configuration:
Type: User-defined
Enable Port Mapping: (checked)
Internal Host: (the private LAN address of the PBX)
Protocol: UDP
Internal Port Number: 26099-26099
External Port Number: 26099-26099

Then, set up a second port mapping:
Type: User-defined
Enable Port Mapping: (checked)
Internal Host: (the private LAN address of the PBX)
Protocol: UDP
Internal Port Number: 10000-20000
External Port Number: 10000-20000

If you still have trouble, post what appears in the Asterisk log when an external extension attempts to register. If nothing, run sngrep and report what appears there on the registration attempt. If nothing there, either, post details of ONT configuration and external client settings.

1 Like

I have everything set exactly as you described above. I have to admit I’m surprised you took the trouble to check the Huawei router’s menu. Thanks for your time and effort.
Unfortunately I still can’t connect to the server. But I’ve got another hypothesis: Since I am still testing this configuration, my only external client is the smartphone with mizudroid. I suspect that the network of my telephone provider is full of blockages, and it is surely an internal network.
I am going to make some tests on other ISPs or ask some friends to log from their places. I will let you know.

EDIT:
sngrep does not show any connections from the outside. It just looks like thew connections weren’t passed through the router. But I know the ports are opened (as a test I opened the freepbx page port and it is visible)
EDIT2:
I called the ISP again and they adviced to set the protocol to TCP/UCP on router. And magically it started to work! Yay!
Thanks all for your help!

1 Like

First of all make your pbx working within one single location.
My backup-pbx is a raspi4 with 4G mem and 16G SD-card, running “raspbx”, which is in fact a little difficult to set up, specifically once you tried to run any “update”-job. Always clone your SD-card before starting an update! It usually crahes most of the things. Never try to install admin-menue!
It doesn’t look like you managed to establish any trunk-connection to your phone-provider, which is one step more complicated using any virtualisation. Mainly using NAT or not using NAT is a problem. Once everthing works within one location, you may establish VPN-connection between some routers from different locations. IP-Phones on other locations are after that able to connect to the PBX via VPN whitch is granted through the LAN-LAN connect of the routers.

PS: Never open any ports on your router for pbx-issues. It is truly never nescessary.
Either your pbx trunk connects through the router to you phone provider, than it works because the calls come in an go out on the registered trunk.
Or your pbx trunk connects like a simple phone at the router. Than the connect to the phone-provider is still held by the router and forwarded to the pbx.
Howver both at the same time is not possible. Either the router holds the outside-lines, or the pbx holds the outside lines than you have to disable or delete all phone-number registries on your router. Because, if pbx tries to register directly and the router is still registered, answers from the phone-provider return to the router first and are never received by the pbx.

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