PBXLocalAddr is empty in config file for 3CX App

Status
Not open for further replies.

cory_G4X2

Forum User
Joined
Aug 26, 2020
Messages
7
Reaction score
0
Hello,

I am having the same issue that this person had. My Local Addr is empty in the 3CX App config file that is included in the welcome email that is sent to extensions. I am running my own self-hosted VM in a vSphere cluster, and the VM has 2 NICs. One NIC is on a public network, where a static public IP will be set. The other NIC is on a private network where a static private IP will be set. The suggestion provided to the other forum member by support was to perform a reinstall and somehow select a NAT configuration during the installation/setup. I just wiped my disk and ran through another install and I did not find any hints of NAT during this process and I am still stuck with an empty "PBXLocalAddr" entry in my configs.

My 3CX instance isn't behind a NAT layer since the public IP will be directly on the machine. As for the private IP, that is part of the same network my office users are on so there is no NAT there either. I have also tried setting our internal dns server (domain controller) to resolve the FQDN to the local IP internally, and then in public DNS it resolves to the public IP. However even though the 3CX softphone still is connecting to the LAN IP it still uses the SIP Tunnel because there isn't an IP in the "PBXLocalAddr" field in the account settings.
 
After going through another 5 or 6 installations trying different things I figured out how to do this. This might not be the "proper" solution, but it's what I think worked for me. It at least gave me my desired outcome in the configuration files.

  1. Perform fresh install of 3CX from their provided debian ISO
  2. When setting up the primary network interface, don't use a public IP. Instead set your private IP up as the primary.
  3. Complete the rest of the install as usual.
  4. After 3CX has completed installing, open up an SSH session and configure your 2nd NIC to have the public IP and give it a default gateway.
    1. You will also need to remove the default gateway from the primary (private) NIC, and instead add some post-up and pre-down statements to add persistent routes.
    2. Here is an example of what I did in my /etc/network/interfaces file
      1. Code:
        # The primary network interface
        allow-hotplug ens224
        iface ens224 inet static
            address 10.1.1.2/24
            post-up route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.1.1.1
            pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 10.1.1.1
        
        # The secondary network interface
        allow-hotplug ens192
        iface ens192 inet static
            address 8.8.8.10/24
            gateway 8.8.8.1
            # dns-* options are implemented by the resolvconf package, if installed
            dns-nameservers 8.8.8.8 8.8.4.4
            dns-search example.com
  5. Then in the 3CX management console > Settings > Network Settings, I changed the Network Card Interface to my public IP
  6. Then in the 3CX MC I went to Extensions > MyExt > Phone Provisioning > Network, I changed the Network Interface for registration and provisioning to my private IP.

After doing all of this, I resent the welcome email and opened the config file that comes attached in a text editor (Like Notepad++ or Atom) and then I noted that <PBXLocalAddr> is no longer empty, and instead contains my private IP address that I originally set 3CX up with. The <PBXPublicAddr> contains my custom FQDN.

---

All that being said the desired behavior that I was seeking was that the 3CX app would then only use the SIP tunnel when a user was external and not in the office on the private LAN. Now when they are in the office LAN the app doesn't use a SIP Tunnel, and when they leave the office it does use the SIP Tunnel. Now I can apply QoS to the RTP traffic specifically since it is no longer encapsulated inside of the tunnel within my office network. Whereas before when I had setup 3CX with a public IP first, it would never populate the <PBXLocalAddr> field in the config files and that would mean a ton of manual effort to program each employees app and then make it never check for updates.
 
Status
Not open for further replies.

Forum statistics

Threads
112,349
Messages
592,026
Members
165,512
Latest member
gmacinit