I have an issue with my Freepbx install where it is not detecting external addresses and using the public IP. It is putting the private IP in all headers which, as you can imagine is breaking things quite badly.
Strangely, the public IP is in the SDP component of an INVITE, but the headers all show local IPs. Here is a sample header.
I have the correct external IP configured in the settings | Asterisk SIP settings page on the general SIP settings tab. I have also tested in the specific locations within the Sip settings (PJSIP) tab. I only use TCP and TLS SIP.
I am at a loss now. I cannot see any specific use NAT, as I have in some other Asterisk UIs, so I assume that it is implicitly set when the correct information is supplied.
This is running on an Azure instance. I have disabled systemd-networkd and I am using ifupdown to keep the network management side happy.
Note that when you change those settings, after Submit and Apply Config you must restart Asterisk. Given the other changes you tried, I recommend rebooting the server.
If the above is not your issue, rule out unwanted modification in the network.
At the Asterisk command prompt, type pjsip set logger on
make a test call and the sent packet will appear in the Asterisk log.
If it has the correct external address, track down what network element is butchering it.
If the packet as sent is still wrong, we can look at the pjsip config files to see which was incorrectly written.
Thanks for the reply. Yes there have been plenty of reboots and the dialogs are originating from asterisk as they arrive at the client.
I.E. pjsip set logger host 202.90.xxx.xxx shows the incorrect address info.
I installed this from pre release 17 and have been upgrading successfully since. I have since added Teams functionality and possible other plug ins that I don’t remember. It is a semi production system. Only my 2 home extensions and mainly used for testing.
If it’s not a simple setting I’m missing, I’ll rebuild the system from scratch and see how it goes. I have not had these issues with Asterisk based systems before. It is strange that the SDP is all based on public IP , but the header is private.
I am away for a week, but I will check in here when I have an outcome to share.
Not terribly strange. pjsip has separate concepts of external_signaling_address and external_media_address . To start, at the Asterisk command prompt, type pjsip show transport 0.0.0.0-tcp
and post the output.
If this object doesn’t exist, type pjsip show transports
find the relevant one and repeat the show transport command with the correct argument.
Looking good on that front, except possibly the external signalling port. Should this be 0? I would have thought it would be 5060 in this case, but assuming here that 0 means default?
I have the installed FreePBX from scratch and as promised I am reporting back that it is now working as it should be, with external IP addresses in the via and contact fields.
This has been a frustrating exercise, with little to indicate the why, but all good now.