FreePBX13, fresh install, not updating trunks-related .conf files

After several hours of repeating setup in different environment the following bug was discovered (reproduced 100% of 10 times) :

  1. Enviromnent
    PHP5.6
    Asterisk13 (which is doesent matter actually)

  2. the FreePBX loads configuration for SIP/IAX trunk from database (both cases, stored from previous versions or freshly generated)

  3. It saves it back to database, all changes applied

  4. The sip.conf file, which is generated by FreePBX have all _additional.conf lines marked by #

  5. none of _additional.conf (related to SIP or IAX trunks) not generated (or updated)

Result - asterisk wont see any trunks at all.

Workout - manually remove # from sip.conf (iax.conf) files from /etc/asterisk, but security warning will be shown and next time when you apply config - have to manually fix it again

Any suggestions ?

Thank you

why are you removing “#” that’s a standard include marker.

Since it’s a new install, a preventative “fwconsole chown” might help. It sounds (to me) like a permissions problem on the output files (either bad directory perms, or the files already exist with the wrong ownership).

Hello
Sorry for “# stupidity” I was confused by regular UNIX-style config files

I’ve made
#amportal chown
several times - not helped

Now I upgraded from FreePBX12 to Freepbx13 trough GUI
still not working
run

#fwconsole chown
not helped

I did create extention for test purposes - the phone could not connect - asterisk say "bad password"
I understand, that there is no extension passed to asterisk (checked trough log files)

Manually check the /etc/asterisk folder permission:
asterisk:asterisk rwx|rwx|r-x

change it to
asterisk:asterisk rwx|rwx|rWx

not helped

freepbx log said
[WARNING] (BMO/Notifications.class.php:487) - [NOTIFICATION]-[framework]-[LANG_INVAL
ID2] - Invalid Language (The default language of ‘en_US’ or ‘en_US.utf8’ was not found on this system. Plea
se resolve this in advanced settings by changing the system language or installing the default locales [Non
existent in Locale, Missing en_US])
[2016-Aug-18 12:36:29] [WARNING] (core/functions.inc.php:6594) - Depreciated Function core_users_list detec
ted in /usr/local/www/freepbx/admin/modules/core/functions.inc.php on line 6315
[2016-Aug-18 12:36:29] [WARNING] (core/functions.inc.php:6594) - Depreciated Function core_users_add detect
ed in /usr/local/www/freepbx/admin/modules/core/functions.inc.php on line 4715
[2016-Aug-18 12:36:29] [WARNING] (core/functions.inc.php:6594) - Depreciated Function core_devices_del dete
cted in /usr/local/www/freepbx/admin/modules/core/functions.inc.php on line 6556
[2016-Aug-18 12:36:29] [WARNING] (core/functions.inc.php:6594) - Depreciated Function core_devices_add dete
cted in /usr/local/www/freepbx/admin/modules/core/functions.inc.php on line 6574
[2016-Aug-18 12:36:29] [WARNING] (core/functions.inc.php:6594) - Depreciated Function core_users_list detec
ted in /usr/local/www/freepbx/admin/modules/core/functions.inc.php on line 897
[2016-Aug-18 12:36:29] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_get
info detected in /usr/local/www/freepbx/admin/libraries/featurecodes.functions.php on line 42
[2016-Aug-18 12:36:29] [WARNING] (core/functions.inc.php:6594) - Depreciated Function core_devices_get dete
cted in /usr/local/www/freepbx/admin/modules/core/functions.inc.php on line 6356
[2016-Aug-18 12:36:29] [WARNING] (core/functions.inc.php:6594) - Depreciated Function core_devices_get dete
cted in /usr/local/www/freepbx/admin/modules/core/functions.inc/drivers/Sip.class.php on line 255
[2016-Aug-18 12:36:29] [WARNING] (core/functions.inc.php:6594) - Depreciated Function core_users_list detec
ted in /usr/local/www/freepbx/admin/modules/userman/functions.inc/guihooks.php on line 59
[2016-Aug-18 12:36:32] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_get
info detected in /usr/local/www/freepbx/admin/libraries/featurecodes.functions.php on line 42
[2016-Aug-18 12:36:32] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_get
info detected in /usr/local/www/freepbx/admin/libraries/featurecodes.functions.php on line 42
[2016-Aug-18 12:36:32] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_get
info detected in /usr/local/www/freepbx/admin/libraries/featurecodes.functions.php on line 42
[2016-Aug-18 12:36:32] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_get
info detected in /usr/local/www/freepbx/admin/libraries/featurecodes.functions.php on line 42
[2016-Aug-18 12:36:32] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_get
info detected in /usr/local/www/freepbx/admin/libraries/featurecodes.functions.php on line 42
[2016-Aug-18 12:36:32] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_get
info detected in /usr/local/www/freepbx/admin/libraries/featurecodes.functions.php on line 42
[2016-Aug-18 12:36:32] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_get
info detected in /usr/local/www/freepbx/admin/modules/core/functions.inc.php on line 1075
[2016-Aug-18 12:36:32] [WARNING] (core/functions.inc.php:6594) - Depreciated Function core_users_list detec
ted in /usr/local/www/freepbx/admin/modules/core/functions.inc.php on line 1674
[2016-Aug-18 12:36:32] [WARNING] (core/functions.inc.php:6594) - Depreciated Function core_routing_list det
ected in /usr/local/www/freepbx/admin/modules/callrecording/functions.inc.php on line 382

Post the log message in full.

Post a screenshot of your extension.

Log Message From Asterisk?

hmm
last time push “Apply config” and sip module stop load

module load chan_sip.so
SIP channel loading…
== Parsing ‘/usr/local/etc/asterisk/sip.conf’: Found
Unable to load module chan_sip.so

Your system is unable to load the shared object module files. You can clear out sip.conf and see if it’ll load but I doubt it. This is why you can’t register.

Huh
I just remove all asterisk and freepbx.
then install asterisk only
check the modules - sip is loaded
ok
then Ive installed Freepbx12 (downloaded fresh distro)
installation is ok. Freepbx and asterisk see each other
ok
I ve created extension (SIP-channel) in FreePBX
ok (see the screenshot)


setup the phone
Ok

see I see in asterisk console log:

[Aug 23 09:39:32] NOTICE[100360]: chan_sip.c:28365 handle_request_register: Registration from ‘101 sip:[email protected]:5060’ failed for ‘10.10.6.2:5060’ - Wrong password

I ve made search trough all the .conf files in /etc/asterisk - no sign for extension 101

That it

Maybe it helps

[2016-Aug-23 08:06:43] [PHP-WARNING] (/usr/local/www/freepbx/admin/modules/sipse
ttings/functions.inc.php:228) - Invalid argument supplied for foreach()
[2016-Aug-23 08:06:43] [PHP-DEPRECATION_WARNING] (/usr/local/www/freepbx/admin/l
ibraries/extensions.class.php:614) - Non-static method extensions::gotoEmpty() s
hould not be called statically, assuming $this from incompatible context
[2016-Aug-23 08:06:43] [PHP-DEPRECATION_WARNING] (/usr/local/www/freepbx/admin/l
ibraries/extensions.class.php:614) - Non-static method extensions::gotoEmpty() s
hould not be called statically, assuming $this from incompatible context
[2016-Aug-23 08:06:43] [PHP-DEPRECATION_WARNING] (/usr/local/www/freepbx/admin/l
ibraries/extensions.class.php:614) - Non-static method extensions::gotoEmpty() s
hould not be called statically, assuming $this from incompatible context

Huh

After removing CURL php extension, the extension_additional.conf begin to create

so
sip_additional.conf
is the only file which is not generated