I recently set up a FreePBX server that I am running on a public IP that is running on a loopback interface that is being advertised into my network via OSPF. I setup a bind IP address in Asterisk to bind all my traffic to, but am having issues with one way audio on extensions behind NAT. As my server is not behind NAT, I don’t expect to set an external IP or define local networks. I adjusted my keep alive timer to get my extensions behind NAT to register, but am still running into issues with one way audio. I’d appreciate any suggestions
I did some more digging with packet captures and I see RTP from my endpoint which follows as I can hear the audio from my endpoint on test calls. However, I never see RTP from my server to my endpoint.
Please confirm that in Asterisk SIP Settings, External Address is correctly set (to your public IPv4 address). If you change this, you must restart (not just reload) Asterisk.
Do you get two-way audio when calling *43 (echo test)? If yes, check for RTP coming in from the trunk on external calls. If not, confirm that RTP Symmetric is set for the extension (it’s the default, but it may have somehow been turned off).
The detect network settings shows my external based on my eth0 interface which uses NAT to get out to the internet because I am using private IPs to advertise my public IP to the rest of my network via OSPF. I have entered my loopback IP into the external address field with no luck.
I get two way audio on an echo test. Looking at rtp set debug on, I never see the server sending RTP to my endpoint, just my endpoint sending RTP to the server.
I performed a packet capture on a working call that isn’t utilizing NAT and I still didn’t see RTP between my endpoint and the server. When I included my outgoing eth0 IP, I saw the RTP stream. I need help to bind my RTP on my server to my public IP address instead of my eth0 ip address.
Well I figured out how to bind RTP to the proper IP address, but I have to make all of the changes to a config file for Asterisk. This isn’t really sustainable going forward as I have to make the change for each extension. Does anyone know of a better way to handle this in FreePBX? I tried using the media address field in the FreePBX GUi, but it does not appear to include the binding option that you can enter in Asterisk config files.
Instead of the hanky panky you are doing with the ethernet interface why don’t you just add a second ethernet interface on the PBX, plug that into the internal network, then have the phones register to that IP address rather than to the public IP?