Brand new SNG7 1910 setup with all current updates as of today, including to Asterisk (13.29.2)
PBX has public IP and is NOT behind NAT. Extension is behind NAT. Registration goes to PBX but Asterisk is using the private IP of the device and not the public IP.
[2020-01-15 04:05:59] VERBOSE[27198] res_pjsip_registrar.c: Added contact 'sip:[email protected]' to AOR '201' with expiration of 3600 seconds
[2020-01-15 04:06:02] VERBOSE[16326] res_pjsip/pjsip_options.c: Contact 201/sip:[email protected] is now Unreachable. RTT: 0.000 msec
Of the many FreePBX setups I’ve done, this is the first time I’m seeing this behavior, and I checked other systems and I see no settings set differently. The External IP is correct, and the local networks setting is blank (as there are no local endpoints).
It seems that the behavior of new PJSIP extension creation changed at some point recently, as new PJSIP extensions used to have Rewrite Contact enabled by default, and now it isn’t.
Is there a way to make this enabled by default for new extension creation?
I don’t know the answer for sure, but I would check the “Advanced Settings” module. There is a SIP NAT setting which I believe is the default extensions module setting for the NAT= field for Chan_SIP extensions, but I would be surprised at all if it also did the equivalent field in pjsip extensions.
EDIT: There actually may be a separate field in Advanced Settings for your field. I have disabled pjsip in my installation and so I might not be able to see it!
This appears to be a serious bug. Updated all modules including Framework 15.0.16.40 and Core 15.0.9.64 yet new extensions have Rewrite Contact = No, even with SIP nat set to yes.
I can confirm on the latest versions of core and framework this setting is automatically being set to No for all (new) extensions. This completely breaks core system functionality of PJSIP extensions / trunks which have worked well at rewrite_contact=yes.
FPBX Team has changed the value to no because Asterisk has no as default value.
Additionally there is no way at the moment to adjust the default value which is set by FreePBX. Only manually from Advanced settings of an extension. (maybe also from the bulk handler?)
Confirmed, FREEPBX-18699 should have applied to trunks only. Starting in Core module versions 14.0.28.29 and 15.0.9.56 (both of which are now in stable repo) the rewrite_contact param is disabled for all pjsip contacts by default. I have an internal ticket to deal with this.