I’m confused by the mixing of register and INVITE, in this report. However, I suspect that the destination unreachable is the result of fail2ban kicking in because of multiple authentication errors.
That means that the phone isn’t properly designed for use behind NAT
There are three setting for working around phones that are behind NAT, but do not compensate for that: force rport, symmetric RTP, and rewrite contact.
These are not obviously related to your port unreachable. That means that there is no process running on port 5060 on the addressed machine (or the firewall is pretending that is the case, to confuse blocked attakers).
The phones were working on a FreePBX 16 system for a year, at the same location.
Pretty much my idea but I need to know how to tell Debian or FreePBX to allow that.
I have checked and there is no default firewall running on the server.
This was installed using the standard script that they tell you to install on Debian 12, and I did.
We were able to get a phone to register on IAX2 but the carrier does not support that protocol.
I have installed 17 twice on two different server and they both show the same issue.
I can do an external UDP Port Scan and it shows open.
I imagine they showed the same failure to include the right address. FreePBX, I think as the default setting, does try to work round this, although there are some cases in which it won’t work (e.g. it requires the phone to send the first media in the call).
I have an older test bed Asterisk Server, running FreePBX 15.
It has PJSIP on it and I cannot register a SIP phone on it either.
I changed to CHAN-SIP and everything is fine. I changed no settings, just the driver.
It appears not Debian, not FreePBX 17, not the phones, not the location of the phones, not the network or anything else like that causing the issue but it’s some setting in PJSIP that eludes me.
PJSIP has been out for many years and I don’t understand why I can’t find many people out there that are having similar issues. And the posts I do find give no answers but end and expire without a conclusion. Did they fix it and not want to share the solution?
If you have FreePBX with both Chan Sip and PJ Sip active, they are on different ports. ChanSip on 5060 and PJSip on 5160 (I think that is the defaults). That may be your issue. If you use only PJSip and disable chan sip, you can use 5060 and the phones should register. We had the same problem when we switched several of our clients from Legacy Chan sip over to PJ Sip.
On FPBX 17, only has PJSIP and it is port 5060 and it does not work.
On FPBX 15, I enabled PJSIP only on port 5060 and it does not work.
Switched to Chan-SIP on FPBX 15 only on port 5060 and it works fine.
There is something about my settings in PJSIP, I’m guessing.
Settings → SIP Settings → SIP Settings {chan_pjsip}
Allow Transports Reload: No
Enable Debug: No
Keep Alive Interval: 90
Caller ID into Contact Header: No
Taskprocessor Overload Trigger: pjsip_only
Show Advanced Settings: No
Endpoint Identifier Order: ip username anonymous header auth_username
TLS: None
Transport: UDP - 0.0.0.0 0 All
Port to Listen On: 5060
Honestly, this sounds like a network issue, not a FreePBX issue. Almsot every time i have had problems like that it was not FreePBX, especially if you did a brand new installation of 17. What are you trying to register ? Desk phones, soft phones ? Have you tried to factory reset a phone and see if it registers then ?