NAT or NONAT? Remote issue

Hi,
I’m trying to access my LAN Freepbx system from the internet, I’ve got a PUBLIC IP, and a pfsense firewall that handle NAT from the outside world.
On the firewall got two NAT rules :

  • public IP port 5060 to internal 5060
    - public IP port 10000-20000 to internal 10000-20000
    these works, seems that is the PBX that send the RTP to another adderss.

I can Register the remote SIP extension but got no audio because the RTP traffic goes all to the wrong IP address.

SIP get natted correctly: remoteext@PUBLICIP
RTP seems to miss NATand keep remote LAN IP: remoteext@REMOTELANIP

I’ve tried all option from the freepbx GUI, also disabling NAT at all but without success.

Do you have your external and internal IP addresses set in Asterisk SIP Settings?

https://doc.pfsense.org/index.php/Asterisk_VoIP

I’m trying to avoid external packages like siproxid.

from nano /etc/asterisk/sip_general_additional.conf

nat=yes
externip=PUBLICIP
localnet=INTERNALLAN.0/255.255.255.0

Dear jfinstrom, I’m reading the pfsense doc, but need some help to understand:

  1. Configure your SIP context
    I’m not using an external sip provider like in the example [sip.broadvoice.com], the PBX does as SIP server for the LAN extensions that use the [from-internal] context.
    This means I should add to [from-internal] the outboundproxy=pfsenseip row?

  2. Configure pfSense firewall/NAT rules
    this should be ok, because the traffic goes in and out, only rtp port is wrong.

  3. The SIP Proxy siproxd
    I’ve enabled the plugin and looked at debug port but it always keep a wait for data status, I’m on 2.1.4 pfsense version.