Can some people smarter than me tell me if freePBX is compatible with my ISP's voice service?

My freePBX instance if on the raw 10.xx.xx.xx network that my isp provides for ATA’s and such. I cannot mess with their NAT. Outbound calls do not have this issue, so i’m puzzled how this can be a NAT mistake. Their SIP server does not reside within the 10.xx.xx.xx network instead on the public internet, yet it seems I can’t access the SIP server from the public internet, and I have to use their 10.xx.xx.xx network for voice. It also holds the call longer even when I hang up, so how can that be a NAT error? Any tips?

Your provider should have given you the SIP server address. You say that address is not on the same 10.x.x.x network as your FreePBX instance is. How have you configured the network settings on FreePBX? Calls being disconnected after 30 seconds mean that there is a misconfiguration on the network settings, be it NAT, port forwarding, port rewriting, SIP ALG intervention and so on.

The log you pasted shows an outbound call that failed because the trunk was unregistered or unreachable. If you want help with incoming, paste a log of an incoming call that disconnected after 32 seconds, including pjsip logger.

Take the log from the end of /var/log/asterisk/full , not from the console, because the file has timestamps that are useful in this situation.

Copied the before and after /var/log/asterisk/full and diff-ed the result, find-replaced out all phone numbers, here ya go:

I can see what is wrong:
Paste line 546: Contact: sip:149.143.xx.xx:5060
Is where Asterisk tells the server where to send the ACK. I’m guessing that this is your public IP on DELTA Fiber Nederland, but I believe that the Contact header address should be 10.226.40.80 . Strangely, line 556 (media address) is correct.

However, I don’t know how to fix this, because I don’t know your network details. Do you have separate NICs for 10.226.40.80 and 192.168.1.110 ? Both addresses on the same NIC? Or something else (VLAN, VPN, etc.)? Do you have separate pjsip transports for the two IPs?

In Settings → Asterisk SIP Settings, please post screenshots of both the General SIP Settings tab and the SIP Settings [chan_pjsip] tab.

The VLAN is handled in the hypervisor, eth0 is my unifi home network and eth1 is vlan 102 directly.
Below is some info you might like:

[root@freepbx ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether d6:0b:b2:00:07:40 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.110/24 brd 192.168.1.255 scope global dynamic eth0
       valid_lft 76061sec preferred_lft 76061sec
    inet6 fe80::d40b:b2ff:fe00:740/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether ba:15:db:0e:db:50 brd ff:ff:ff:ff:ff:ff
    inet 10.226.40.80/21 brd 10.226.47.255 scope global dynamic eth1
       valid_lft 49503sec preferred_lft 49503sec
    inet6 fe80::b815:dbff:fe0e:db50/64 scope link 
       valid_lft forever preferred_lft forever
[root@freepbx ~]# 
[root@freepbx ~]# dig voice.caiw.net

; <<>> DiG 9.11.4-P2-RedHat-9.11.4-16.P2.el7_8.6 <<>> voice.caiw.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42035
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;voice.caiw.net.			IN	A

;; ANSWER SECTION:
voice.caiw.net.		229	IN	CNAME	proxy.thor.caiw.net.
proxy.thor.caiw.net.	48	IN	A	62.45.59.50
proxy.thor.caiw.net.	48	IN	A	62.45.59.36
proxy.thor.caiw.net.	48	IN	A	62.45.58.162
proxy.thor.caiw.net.	48	IN	A	62.45.58.180

;; Query time: 8 msec
;; SERVER: 62.45.59.40#53(62.45.59.40)
;; WHEN: Sun Jan 12 06:03:53 UTC 2025
;; MSG SIZE  rcvd: 132

[root@freepbx ~]# 



had to rotate my screen to get those legible. btw 192.168.50.x was from when I used a fritzbox as an ATA, the network config files for that don’t exist anymore.
Yes, 149.143.xx.xx was my IP adress, it’s different now. (god I have to change my domain again!)
I think it may be that their coax network uses voip over top the normal internet. may be so.
I don’t know if I have to have seperate transports, to be fair.
Nothing I have set up makes it so that one interface is used over the other, but outbound calls just work? I am highly confusion.

Normally, you need separate transports for each NIC (even if the NICs are virtual).
However, I’m guessing that a cheap fix may work:
In Asterisk SIP Settings, General SIP Settings tab, NAT Settings, click Add Local Network Field.
Enter 62.45.58.0 / 23
After Submit and Apply Config, you must restart Asterisk. Test both outbound and inbound.

If it works, great. If not, report whether this change caused the proper Contact header. If so,
paste a new log and we can see if there’s another issue. If not, we can try setting up two transports.

I’m trying to do this correctly, why else would I have a proxmox virtualised PBX with only two extensions on a home phone line? I’m trying to learn, homelab style. I am now going to read how to add a transport for each NIC, and I’ll come back with the results.

On the pjsip tab, set Show Advanced Settings to Yes, Submit and Apply config.
You should now see options for separate transports. Disable the udp - 0.0.0.0 one and enable both udp NIC-specific transports. After Submit, Apply Config and Asterisk restart, you should be no worse off than before.

Then, for the eth1 transport, I think that you can set Local Network to 0.0.0.0 / 0 (i.e. there is no NAT). If that doesn’t work, take it out and try setting External IP Address to 10.226.40.80
If that also doesn’t work, we’ll need some logs to see what is going on. Note that both of these changes require Asterisk restart.

I noticed that I cannot reach the public internet from my PBX anymore. all dig commands go to the DNS for voice, which only knows caiw.net. I cannot reach 1.1.1.1. How do I fix this? routing rules?

You have a multi-homed network configuration on the FreePBX. Most probable issue here is that incoming SIP connections are entering your FreePBX through the default gateway on your 192.168 network. You need to correctly set the Asterisk network settings and create a routing table to take care of your SIP connection over the 10.x.x.x network.

I am stupid! I made another transport but I did not select it in the trunk. Shit works now, thanks everyone!