Running FreePBX in docker is not recommended and will probably give you a “Bad Time” at some point in the future. FreePBX just simply wasn’t built to run in docker and fundamental changes will need to be made to the Core of FreePBX for it work correctly. You’re better off running it in a VM.
I wouldn’t recommend running two PBXs on the same IP. It can be done, but the setup will be rather complex. At a minimum you’re probably looking at having to setup a proxy for the signaling (Kamalio) and a proxy for RTP (RTPProxy). At this point you’re probably pushing the limits of what FreePBX can do for you.
I’ll also note that using docker networking with asterisk is NOT recommend at all. The ONLY configuration option I would recommend would be that docker networking is disabled and only the host network is used. This is mainly due to the fact that docker launches one proxy instance per port and for RTP, which has a range of 16384 to 32767, that’s a lot of proxies to launch and will consume a lot of memory and resources.
I have used lxd/lxc to multiplex one ip. But you will need to proxy your https ports (easy with nginx) and if using SIP, both signalling and media will need a proxy, which will probably lead to kamailio or such in another container, ( IAX2 is a much simpler route, ) Does it work? yes, is it worth the effort? in my case ‘no’ with do/vultr/whatever selling IP space and room for FreePBX for $5/month
I agree with Stewart. If your provider does username/pass auth its no problem using 2 pbxs on same ip with different ports.
If they do IP auth only. You will need to change the port they send to. Some will alternatively let you set a custom sip uri with the port. Vitelity cant do this but username/pass auth works fine.
I run a trunk from a cloud freepbx to 2 different avaya PBX’s on the same public IP. We just changed the rtp and sip ports on the avaya and freepbx sends calls to the different sip ports. So totally possible.
But like dicko said vultr boxes are $5 and come with a public IP.
Dicko You can run https on different ports. Its a pbx not a web server. I dont run much at all on standard ports if its publically accessible. Sometimes customers need to be able to access UCP from anywhere. They are going to have to scan all 65000 tcp ports before finding it and checking to see if theres a vulnerability. It is what it is but Im not going to make everyone vpn in to change follow me rules.