I’m going to guess either you didn’t follow the directions to the letter, missed a step or are attempting to do it with newer versions of something then what is documented.
When it can’t get the asterisk version either you didn’t install asterisk or it’s not running. Please make sure it is running and if not check the log to see why it is not /var/log/asterisk/full is the log file to check.
Followed the steps closely, i also after all this tried a guide i found to install asterix on CentOS 5.2 (the os i´m using) which has a couple of different things, again as before, asterix works, but when trying to install freepbx, i get the same error indicated in my original post.
I looked for the logs, however i do not have a “full” file in /var/log/asterisk/, only the following:
cdr-csv/ cdr-custom/ event_log messages queue_log
the only one that contains anything is messages, with the following:
[Mar 5 05:23:41] NOTICE[15880] pbx_ael.c: AEL load process: merged config file name ‘/etc/asterisk/extensions.ael’.
[Mar 5 05:23:41] NOTICE[15880] pbx_ael.c: AEL load process: verified config file name ‘/etc/asterisk/extensions.ael’.
[Mar 5 05:44:04] NOTICE[2867] cdr.c: CDR simple logging enabled.
[Mar 5 05:44:04] NOTICE[2867] loader.c: 148 modules will be loaded.
[Mar 5 05:44:07] WARNING[2867] res_smdi.c: No SMDI interfaces are available to listen on, not starting SMDI listener.
[Mar 5 05:44:09] NOTICE[2867] config.c: Registered Config Engine mysql
[Mar 5 05:44:12] NOTICE[2867] pbx_ael.c: Starting AEL load process.
[Mar 5 05:44:12] NOTICE[2867] pbx_ael.c: AEL load process: calculated config file name ‘/etc/asterisk/extensions.ael’.
[Mar 5 05:44:12] NOTICE[2867] pbx_ael.c: AEL load process: parsed config file name ‘/etc/asterisk/extensions.ael’.
[Mar 5 05:44:12] NOTICE[2867] pbx_ael.c: AEL load process: checked config file name ‘/etc/asterisk/extensions.ael’.
[Mar 5 05:44:12] NOTICE[2867] pbx_ael.c: AEL load process: compiled config file name ‘/etc/asterisk/extensions.ael’.
[Mar 5 05:44:12] NOTICE[2867] pbx_ael.c: AEL load process: merged config file name ‘/etc/asterisk/extensions.ael’.
[Mar 5 05:44:12] NOTICE[2867] pbx_ael.c: AEL load process: verified config file name ‘/etc/asterisk/extensions.ael’.
[Mar 5 05:44:12] WARNING[2867] config.c: parse error: No category context for line 14 of /etc/asterisk/cdr_mysql.conf
[Mar 5 05:44:12] WARNING[2867] cdr_addon_mysql.c: Unable to load config for mysql CDR’s: cdr_mysql.conf
As you can see there´s a couple of warnings, however i can´t make any sense out of it.
something is wrong with your cdr_mysql.conf file, at or above line 14.
See http://freepbx.org/configuration_files it has a copy of the default cdr_mysql.conf file and your should look like that (maybe with the username and password different if you entered something besides taking the default).
Ok i think i fixed the db connection issue, messages now reports this:
[Mar 5 11:31:46] NOTICE[17558] pbx_ael.c: Starting AEL load process.
[Mar 5 11:31:46] NOTICE[17558] ael.y: Note: In asterisk.conf, in the [compat] section, the app_set is set to 1.6 or greater. The Set() function no longer removes double quotes$
[Mar 5 11:31:46] NOTICE[17558] pbx_ael.c: AEL load process: parsed config file name ‘/etc/asterisk/extensions.ael’.
[Mar 5 11:31:46] NOTICE[17558] pbx_ael.c: AEL load process: checked config file name ‘/etc/asterisk/extensions.ael’.
[Mar 5 11:31:46] NOTICE[17558] pbx_ael.c: AEL load process: compiled config file name ‘/etc/asterisk/extensions.ael’.
[Mar 5 11:31:46] NOTICE[17558] pbx_ael.c: AEL load process: merged config file name ‘/etc/asterisk/extensions.ael’.
[Mar 5 11:31:46] NOTICE[17558] pbx_ael.c: AEL load process: verified config file name ‘/etc/asterisk/extensions.ael’.
[Mar 5 11:31:46] NOTICE[17558] cdr_addon_mysql.c: Found a DB column recid, type mediumint(8) unsigned
[Mar 5 11:31:46] NOTICE[17558] cdr_addon_mysql.c: Found a DB column calldate, type datetime
[Mar 5 11:31:46] NOTICE[17558] cdr_addon_mysql.c: Found a DB column clid, type varchar(80)
[Mar 5 11:31:46] NOTICE[17558] cdr_addon_mysql.c: Found a DB column src, type varchar(80)
[Mar 5 11:31:46] NOTICE[17558] cdr_addon_mysql.c: Found a DB column dst, type varchar(80)
[Mar 5 11:31:46] NOTICE[17558] cdr_addon_mysql.c: Found a DB column dcontext, type varchar(80)
[Mar 5 11:31:46] NOTICE[17558] cdr_addon_mysql.c: Found a DB column channel, type varchar(80)
[Mar 5 11:31:46] NOTICE[17558] cdr_addon_mysql.c: Found a DB column dstchannel, type varchar(80)
[Mar 5 11:31:46] NOTICE[17558] cdr_addon_mysql.c: Found a DB column lastapp, type varchar(80)
[Mar 5 11:31:46] NOTICE[17558] cdr_addon_mysql.c: Found a DB column lastdata, type varchar(80)
[Mar 5 11:31:46] NOTICE[17558] cdr_addon_mysql.c: Found a DB column duration, type int(11)
[Mar 5 11:31:46] NOTICE[17558] cdr_addon_mysql.c: Found a DB column billsec, type int(11)
[Mar 5 11:31:46] NOTICE[17558] cdr_addon_mysql.c: Found a DB column disposition, type varchar(45)
[Mar 5 11:31:46] NOTICE[17558] cdr_addon_mysql.c: Found a DB column amaflags, type int(11)
[Mar 5 11:31:46] NOTICE[17558] cdr_addon_mysql.c: Found a DB column accountcode, type varchar(20)
[Mar 5 11:31:46] NOTICE[17558] cdr_addon_mysql.c: Found a DB column uniqueid, type varchar(32)
[Mar 5 11:31:46] NOTICE[17558] cdr_addon_mysql.c: Found a DB column userfield, type varchar(255)
HOWEVER the original install problem still remains : /
NOTE the third line in messaged, reffering to version number and double quotes, could this be related to the freepbx install error?
I´ve checked the file and there are no double quotes, just 1.6:
ah, I should have asked first. What version of asterisk are you attempting to use? If it is the newest bleeding edge version it might not work. Starting with 1.6 the asterisk developers reserved the right to change things from release version to release version. So something that worked at 1.6.0.2 might not suddenly work at 1.6.0.7. If you are using a new version that came out in say the last month that could very well be the issue.
I went ahead and installed asterisk 1.4, installed and starts perfectly as always, tried running ./install_amp from the freepbx-2.5.0 folder, and again same error as original post.
By now i´m pretty certain it has to do with the /sbin/ztcfg step.
But i´m out of ideas on how to fix it.
Another Update:
Tryed installing in another server of mine, same config, same problem.
Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking user…OK
Checking if Asterisk is running…
Warning: exec() has been disabled for security reasons in /usr/src/freepbx-2.5.0/install_amp on line 718
running with PID: …OK
Checking for /etc/amportal.conf…OK
Reading /etc/amportal.conf…OK
Checking for /etc/asterisk/asterisk.conf…OK
Reading /etc/asterisk/asterisk.conf…OK
Using asterisk as PBX Engine
Warning: exec() has been disabled for security reasons in /usr/src/freepbx-2.5.0/install_amp on line 854
Checking for Asterisk version…[FATAL] Could not determine asterisk version (got: “” please report this)
Then based on you comment above you’ve probably also tightened other things that are now also getting in the way. The proper way would be to start with a stock install (don’t touch anything, no security setting, etc. that you think should be touched) and go from there. It’s easier to get it working and then apply security one thing at a time so you can test to be sure you’ve not broken something.
But it’s hard to help as you’ve not provided a list of things you changed because you wanted to improve security.
I only made a couple of modifications to httpd.conf and installed CSF firewall (which i disabled during this whole process, so we can take that out of the way).
The problem now however i don´t it has nothing to do with security, it´s just a conflict, is FreePBX supposed to work with WHM/Cpanel on the same server?
On the background it works, both freepbx and asterisk, the problem is getting to the admin panel, because serverip is already assigned to WHM/CPanel, so serverip/admin (to access freepbx) just takes you to WHM/CPanel. So i guess what i need to find out is how to access freepbx another way through the internet.
Unfortunately google seems to report nothing about this, i´m pretty sure other people must have WHM/CPanel and FreePBX on their server, can´t be i´m the only one can it? : )
I’ve never used WHM/CPanel so I can’t help. But like I said start with a standard base install then install asterisk and FreePBX at that point. you’ve not done that you’ve installed other products first and we don’t knowing what security settings, possible .htaccess rights, etc. they have setup or changed.
when you build a phone system it should ONLY be a phone system, not a web server, not in a VM, not a VPN concentrator, the corporate firewall, etc. Every extra thing you install on it has the potential of becoming a huge impact on the operation of it and performance of the audio. Yes some do use VM’s and they are either in very light duty situations or do testing which VM’s work great for.
Many, many people here will tell you DO NOT DO IT. The performance, stability and quality of audio that you end up hearing are the big reasons why. Even in these tough times you can go to walmart and purchase a $200 e-machine (not my recommendation but I know many that do it) and build a very good phone system on them and have zero issues. Trying to force a phone system onto a already tasked system is not a good thing as the human ear can hear minor timing issues with sound packets not arriving on time. most people can’t tell the difference between 2040 Hz and 2041 Hz but when it is interrupted for 10 ms because the packet was late, boy you’ll hear about it.
So if I were you scrap the box, start from scratch, do a proper base build and get it working, make TWO backups then if you insist on using CPanel install it and figure out what they change that causes issues (i.e. compare it to the backups), don’t try and do it the other way around as you’ll be chasing issues for years because of it.