Thanks Bill. I just updated my post.
Is ātransport_reuseā some new setting by naf? Itās not in the Asterisk documentation
I am not sure, would need to ask Naf. I did however find where its mentioned:
grep --include=\* -rnw '/usr/src/asterisk' -e "transport_reuse"
:
Binary file /usr/src/asterisk/res/res_pjsip_outbound_registration.so matches
/usr/src/asterisk/res/res_pjsip_outbound_registration.c:155: <configOption name="transport_reuse" default="yes">
/usr/src/asterisk/res/res_pjsip_outbound_registration.c:344: unsigned int transport_reuse;
/usr/src/asterisk/res/res_pjsip_outbound_registration.c:406: unsigned int transport_reuse;
/usr/src/asterisk/res/res_pjsip_outbound_registration.c:587:/*! \brief Callback used to manually select transport when transport_reuse is off */
/usr/src/asterisk/res/res_pjsip_outbound_registration.c:606: ast_log(LOG_ERROR, "transport_reuse requires setting a transport\n");
/usr/src/asterisk/res/res_pjsip_outbound_registration.c:713: if (!client_state->transport_reuse) {
/usr/src/asterisk/res/res_pjsip_outbound_registration.c:1736: if (!registration->transport_reuse) {
/usr/src/asterisk/res/res_pjsip_outbound_registration.c:1768: state->client_state->transport_reuse = registration->transport_reuse;
/usr/src/asterisk/res/res_pjsip_outbound_registration.c:2696: ast_sorcery_object_field_register(ast_sip_get_sorcery(), "registration", "transport_reuse", "yes", OPT_BOOL_T, 1, FLDSET(struct sip_outbound_registration, transport_reuse));
Binary file /usr/src/asterisk/res/res_pjsip_outbound_registration.o matches
/usr/src/asterisk/README.md:47:transport_reuse=no
/usr/src/asterisk/README.md:91:transport_reuse=no
/usr/src/asterisk/doc/core-en_US.xml:25696: <configOption name="transport_reuse" default="yes">
That did not resolve it:
after hitting apply:
Full Text:
exit: 1
Unable to continue. Unable to locate the FreePBX BMO Class 'Sipsettings'A required module might be disabled or uninstalled. Recommended steps (run from the CLI): 1) fwconsole ma install sipsettings 2) fwconsole ma enable sipsettings in /var/www/html/admin/libraries/BMO/Self_Helper.class.php on line 213
#0 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(106): FreePBX\Self_Helper->loadObject('Sipsettings')
#1 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(37): FreePBX\Self_Helper->autoLoad('Sipsettings')
#2 /var/www/html/admin/modules/core/functions.inc/drivers/PJSip.class.php(929): FreePBX\Self_Helper->__get('Sipsettings')
#3 /var/www/html/admin/modules/core/functions.inc/drivers/PJSip.class.php(330): FreePBX\modules\Core\Drivers\PJSip->generateEndpoints(Array)
#4 /var/www/html/admin/modules/core/Core.class.php(204): FreePBX\modules\Core\Drivers\PJSip->genConfig()
#5 /var/www/html/admin/libraries/BMO/FileHooks.class.php(97): FreePBX\modules\Core->genConfig()
#6 /var/www/html/admin/libraries/BMO/FileHooks.class.php(26): FreePBX\FileHooks->processNewHooks()
#7 /var/lib/asterisk/bin/retrieve_conf(877): FreePBX\FileHooks->processFileHooks(Array)
#8 {main}
after submitting localization info and going to dashboard:
and viewing the Asterisk Log file:
[2018-Jul-10 14:58:16] [CRITICAL] (admin/bootstrap.php:260) - Connection attmempt to AMI failed
[2018-Jul-10 14:58:52] [ERROR] (BMO/Notifications.class.php:507) - [NOTIFICATION]-[framework]-[ASTCONFAPPMISSING] - No Conference Room App (Neither app_meetme nor app_confbridge is configured in Asterisk, conferencing, paging and other functionality will not work properly)
[2018-Jul-10 14:58:53] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_getinfo detected in /var/www/html/admin/modules/core/functions.inc.php on line 1068
[2018-Jul-10 14:58:53] [WARNING] (core/functions.inc.php:6193) - Depreciated Function core_users_list detected in /var/www/html/admin/modules/core/functions.inc.php on line 1676
[2018-Jul-10 14:58:53] [WARNING] (core/functions.inc.php:6193) - Depreciated Function core_routing_list detected in /var/www/html/admin/modules/callrecording/functions.inc.php on line 401
[2018-Jul-10 14:58:53] [CRITICAL] (BMO/Notifications.class.php:507) - [NOTIFICATION]-[freepbx]-[RCONFFAIL] - retrieve_conf failed, config not applied (Reload failed because retrieve_conf encountered an error: 1)
I took a look at what I could find that had ASTETCDIR, but nothing stood out to me, what should I be looking for exactly? thank you.
You need to install sipsettings. The module. You have modules that are not installed.
Are you sure that the NAF version of Asterisk is not screwed up?
No I am not, the only thing that I am sure of is that everything seems to work perfectly so long as I run āmake samplesā during the install. I think I need to keep investigating the reason for that, because it is very odd.
The sipsettings module for instance, if I include āmake samplesā then all that is needed is to install freepbx:
cd freepbx
sudo ./install -n
but if I do not include āmake samplesā then the sipsettings module does not install? Obviously that is not normal behavior and something very strange is happening, I just havenāt figured it out yet.
Why donāt you post the output of ./install. Iām sure the error is in there
Good Idea and thank you! I did read over it as it installed, and everything looked ok to me, but your FreePBX trained eyes might see something I am missing. Restoring my drive to prior the install, and I will increase the history buffer so that I can capture the full output.
section of ./install that stood out to me, especially since I was looking for sipsettings:
Module dashboard successfully installed
In php-asmanager.php line 242:
Asterisk is not connected
Installing sipsettings...
In php-asmanager.php line 242:
Asterisk is not connected
So if Asterisk is not connected is the problem I am having, I wonder which config file from make samples was responsible for bypassing this problem during install, or more importantly what I should be doing to fix this.
Full Output:
/usr/src/freepbx$ sudo ./install -n
[sudo] password for gvsip:
Assuming you are Database Root
Checking if SELinux is enabled...Its not (good)!
Reading /etc/asterisk/asterisk.conf...Done
Checking if Asterisk is running and we can talk to it as the 'asterisk' user...Yes. Determined Asterisk version to be: 15
Preliminary checks done. Starting FreePBX Installation
Checking if this is a new install...Yes (No /etc/freepbx.conf file detected)
Database Root installation checking credentials and permissions..Connected!
Blank /etc/odbc.ini file detected. Installing...Done
Empty asterisk Database going to populate it
Updating tables admin, ampusers, cronmanager, featurecodes, freepbx_log, freepbx_settings, globals, module_xml, modules, notifications...Done
Empty asteriskcdrdb Database going to populate it
Initializing FreePBX Settings
Changing AMPMGRPASS [amp111] to match what was given at install time: c1003b95b9c404cafe81d60b1ece57ef
Finished initalizing settings
Copying files (this may take a bit)....
7119/7119 [============================] 100%
Done
bin is: /var/lib/asterisk/bin
sbin is: /usr/sbin
Symlinking /var/lib/asterisk/bin/fwconsole to /usr/sbin/fwconsole ...Done
Symlinking /var/lib/asterisk/bin/amportal to /usr/sbin/amportal ...Done
Finishing up directory processes...Done!
Running variable replacement...Done
Creating missing #include files...Done
Setting up Asterisk Manager Connection...Done
Running through upgrades...
Checking for upgrades..
No further upgrades necessary
Finished upgrades
Setting FreePBX version to 14.0.3.6...Done
Writing out /etc/amportal.conf...Done
Writing out /etc/freepbx.conf...Done
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions...
Setting base permissions...Done
Setting specific permissions...
3888 [============================]
Finished setting permissions
Installing framework...
Updating tables admin, ampusers, cronmanager, featurecodes, freepbx_log, freepbx_settings, globals, module_xml, modules, notifications...Done
No directory /var/www/html/admin/modules/framework/amp_conf/htdocs, install script not needed
Generating CSS...Done
Module framework successfully installed
Updating Hooks...Done
Done
Building Packaged Scripts...Done
Trusting FreePBX...Trusted
Installing base modules...Updating tables trunks, pjsip, sip, dahdi, iax, indications_zonelist, devices, users, incoming, outbound_routes, dahdichandids, outbound_route_patterns, outbound_route_sequence, outbound_route_trunks, outbound_routes, trunk_dialpatterns...Done
Migrating pickup groups to named pickup groups
Migrating call groups to named call groups
Checking for possibly invalid emergency caller id fields..none found
Migrating old media encryption values...done
Generating CSS...Done
Module core successfully installed
Generating CSS...Done
Module dashboard successfully installed
In php-asmanager.php line 242:
Asterisk is not connected
ma [-f|--force] [-d|--debug] [--edge] [--stable] [--color] [--skipchown] [-e|--autoenable] [--skipdisabled] [--snapshot SNAPSHOT] [--format FORMAT] [-R|--repo REPO] [-t|--tag TAG] [--onlystdout] [--willupdate] [--securityonly] [--sendemails] [--] [<args>]...
checking for sipsettings table..Installing all modules...Installing: callrecording, cdr, conferences, customappsreg, featurecodeadmin, infoservices, logfiles, music, recordings, sipsettings, voicemail
Installing callrecording...
Generating CSS...Done
Module callrecording successfully installed
Updating Hooks...Done
Installing cdr...
Checking if field cnum is present in cdr table..OK!
Checking if field cnam is present in cdr table..OK!
Checking if field outbound_cnum is present in cdr table..OK!
Checking if field outbound_cnam is present in cdr table..OK!
Checking if field dst_cnam is present in cdr table..OK!
Checking if field linkedid is present in cdr table..Adding!
Checking if field peeraccount is present in cdr table..Adding!
Checking if field sequence is present in cdr table..Adding!
OK!
Generating CSS...Done
Module cdr successfully installed
Updating Hooks...Done
Installing conferences...
Detected Missing Dependency of: recordings 13.0.2
Found local Dependency of: recordings 13.0.30.12
Detected Missing Dependency of: soundlang
Downloading Missing Dependency of: soundlang
Processing soundlang
Downloading...
0/105155 [>---------------------------] 0%
10944/105155 [==>-------------------------] 10%
23256/105155 [======>---------------------] 22%
32832/105155 [========>-------------------] 31%
45144/105155 [============>---------------] 42%
54720/105155 [==============>-------------] 52%
65664/105155 [=================>----------] 62%
73872/105155 [===================>--------] 70%
87552/105155 [=======================>----] 83%
95760/105155 [=========================>--] 91%
105155/105155 [============================] 100%
Finished downloading
Extracting...Done
Module soundlang successfully downloaded
Installing Missing Dependency of: soundlang
Updating tables soundlang_packages, soundlang_settings, soundlang_customlangs, soundlang_prompts...Done
New install, downloading default english language set...
Installing core-sounds-g722...Done
Installing core-sounds-ulaw...Done
Installing extra-sounds-g722...Done
Installing extra-sounds-ulaw...Done
Finished installing default sounds
Installing/updating packages for en...Done
Generating CSS...Done
Installed Missing Dependency of: soundlang
Installing Missing Dependency of: recordings 13.0.2
checking for fcode field..already exists
checking for fcode_pass field..already exists
Generating CSS...Done
Installed Missing Dependency of: recordings 13.0.2
Generating CSS...Done
Module conferences successfully installed
Updating Hooks...Done
Installing customappsreg...
Generating CSS...Done
Module customappsreg successfully installed
Updating Hooks...Done
Installing featurecodeadmin...
Generating CSS...Done
Module featurecodeadmin successfully installed
Updating Hooks...Done
Installing infoservices...
Generating CSS...Done
Module infoservices successfully installed
Updating Hooks...Done
Installing logfiles...
Generating CSS...Done
Module logfiles successfully installed
Updating Hooks...Done
Installing music...
Generating CSS...Done
Module music successfully installed
Updating Hooks...Done
Installing recordings...
checking for fcode field..already exists
checking for fcode_pass field..already exists
Generating CSS...Done
Module recordings successfully installed
Updating Hooks...Done
Installing sipsettings...
In php-asmanager.php line 242:
Asterisk is not connected
ma [-f|--force] [-d|--debug] [--edge] [--stable] [--color] [--skipchown] [-e|--autoenable] [--skipdisabled] [--snapshot SNAPSHOT] [--format FORMAT] [-R|--repo REPO] [-t|--tag TAG] [--onlystdout] [--willupdate] [--securityonly] [--sendemails] [--] [<args>]...
checking for sipsettings table..
Installing voicemail...
Checking for General Setting migrations..not needed
checking if Voicemail Admin (vmailadmin) is installed..not installed, ok
Generating CSS...Done
Module voicemail successfully installed
Updating Hooks...Done
Done. All modules installed.
Updating Hooks...Done
Done installing modules
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions...
Setting base permissions...Done
Setting specific permissions...
13849 [============================]
Finished setting permissions
Generating default configurations...
Finished generating default configurations
You have successfully installed FreePBX
Asterisk needs to be running as asterisk:asterisk before you do the ./install if you are āoff the rangeā, āon the rangeā asterisk would be started as necessary.
I believe it is, here is the start of my install:
Checking if Asterisk is running and we can talk to it as the 'asterisk' user...Yes. Determined Asterisk version to be: 15
Preliminary checks done. Starting FreePBX Installation
and some process info:
/usr/src/freepbx$ ps aux | grep asterisk
asterisk 551 0.0 2.5 465148 51108 ? S 17:12 0:00 /usr/sbin/apache2 -k start
asterisk 552 0.0 2.3 461868 46764 ? S 17:12 0:00 /usr/sbin/apache2 -k start
asterisk 553 0.0 2.5 464428 49556 ? S 17:12 0:00 /usr/sbin/apache2 -k start
asterisk 554 0.0 2.3 461868 46760 ? S 17:12 0:00 /usr/sbin/apache2 -k start
asterisk 555 0.0 2.3 461868 46760 ? S 17:12 0:00 /usr/sbin/apache2 -k start
asterisk 709 0.0 1.6 1122252 32992 ? Ssl 17:12 0:00 /usr/sbin/asterisk -U asterisk -G asterisk
asterisk 820 0.0 2.3 461868 46780 ? S 17:12 0:00 /usr/sbin/apache2 -k start
root 981 0.0 0.7 243396 14252 ? Ss 17:14 0:00 dirmngr --daemon --homedir /var/lib/asterisk/.gnupg
root 985 0.0 0.0 90376 644 ? Ss 17:14 0:00 gpg-agent --homedir /var/lib/asterisk/.gnupg --use-standard-socket --daemon
carry on digging, youāll get there make sure that Apache2 is also running as asterisk:asterisk
ps -aux |grep asterisk
again you can fix that in debian at
/etc/default/apache2
seems one of the apache processes is running as root?
/usr/src/freepbx$ ps -aux |grep apache
root 529 0.0 2.4 455780 49200 ? Ss 17:12 0:00 /usr/sbin/apache2 -k start
asterisk 551 0.0 2.5 465148 51108 ? S 17:12 0:00 /usr/sbin/apache2 -k start
asterisk 552 0.0 2.3 461868 46764 ? S 17:12 0:00 /usr/sbin/apache2 -k start
asterisk 553 0.0 2.5 464432 49568 ? S 17:12 0:00 /usr/sbin/apache2 -k start
asterisk 554 0.0 2.5 464432 49572 ? S 17:12 0:00 /usr/sbin/apache2 -k start
asterisk 555 0.0 2.5 464432 49572 ? S 17:12 0:00 /usr/sbin/apache2 -k start
asterisk 820 0.0 2.3 461868 46780 ? S 17:12 0:00 /usr/sbin/apache2 -k start
I am not sure how to determine if that is the issue or not though.
AH wait, I see you can compare the process ID
Youāll get there you are very ādogg-edā
I am looking at line 242 in php-asmanager.php
if(!$this->connected()) {
throw new Exception("Asterisk is not connected");
}
It looks like this file deals with the Asterisk Database?
So I am wondering if the reason for Asterisk is not connected could be a credentials issue? maybe something that was in one of the config files that āmake samplesā installs had some credentials for a default install?
edit:
Actually, the ./install output suggests that database was working:
Database Root installation checking credentials and permissions..Connected!
Blank /etc/odbc.ini file detected. Installing...Done
Empty asterisk Database going to populate it
Updating tables admin, ampusers, cronmanager, featurecodes, freepbx_log, freepbx_settings, globals, module_xml, modules, notifications...Done
Empty asteriskcdrdb Database going to populate it
Edit2: Because simply copying config files from the samples directory to the /etc/asterisk directory makes EVERYTHING work perfectly. I think this is a case of an issue in the Freepbx installer not creating the files as needed. And then one config missing breaks another section of the installer, possibly because of a dependency requirement, like a chain reaction.
I am currently installing the sangoma Distro, so that I can get a list of the default installed configs and compare whats missing from the ubuntu install.
I doubt it mysql/php/apache all need to be kosher, on you go . . . .
These are happening because during your install FreePBX canāt talk to Asterisk.
You are installing this a root right?
No I am not, but most commands are done using sudo. Is this the reason that the sample config files prevent those errors?
I have made some progress today. It seems only certain config files need to be present.
I am still narrowing down the list, once I am done I will just copy the files that are needed, instead of running make samples.
I am also going to compare the sample config files to the ones installed by sangoma distro to make sure there arenāt any concerns in the sample files.
EDIT: Trying it now, thank you.
EDIT: That worked, installed clean without problems by installing as root. Very odd that its not a problem if the config files are in place, I wonder why?
Thank you so much! I can clean up and finalize this guide.
As specified in the wiki you need to install freepbx as root.
This has nothing to do with sample files and everything to do with the fact that freepbx cant talk to asterisk. Most-likely itās creating the manager.conf file and then trying to reload or restart asterisk and failing because it doesnāt have rights to do so.
Then later itās not able to make an ami connection and thus it canāt determine the version of asterisk, or if it supports confbridge and sipsettings fails
Of note in DSL Reports @reraikes has updated his scripts to use the NAF patches and he does not use make samples. [PBX] GVSIP for FreePBX - VOIP Tech Chat | DSLReports Forums