FreePBX 2.1.3, CentOS 4.4

Hi guys,

Looks like I may have found a conflict with Freepbx 2.1.3 and CentOS 4.4. After installing centos, compiling asterisk and freepbx I start getting mysql errors, in particular sock errors.

To begin with I thought the sql installtion was corrupt, so I used ‘yum remove mysql and mysql-server’, then ‘yum install mysql and mysql-server’. The server then started ok and I was able to log into the free pbx web interface and configure some extensions. After a reboot I was faced with the same problem.

Next thought was it is hardware specific, so I installed it on a brand new server, intel motherboard, intel P4, 1 GB RAM, Digium TDM card. Same issues.

I am about to try the same hardware with Centos 4.3 and see if it resolves the issues.

Has anybody else had this problem?

Ok I installed CentOS 4.3 (Server CD) on the same machine
Then used yum to install the Development tools, ran yum update and reboot.

Installed asterisk and freepbx as usual and had no issues. I have rebooted the system several times, I have added g729 codec and the system is testing fine.

Bit of a weird problem :?

I do not have an answer for you, but just to relate my experience.

I did the same like you, installed CentOS-4.4-ServerCD, yum update, SVN downloaded all the latest stable asterisk, zaptel, addons and sounds, and yum install , configured MYSQL, following every step as per ROB’s CentOS-4.3 Installation Walkthrough.

So far so good, the system is up and running now. I enabled MG2 echo canceller and the voice is clear.

On Sun, 15 Oct 2006, kgtee wrote:

[quote] I do not have an answer for you, but just to relate my experience.

I did the same like you, installed CentOS-4.4-ServerCD, yum update, SVN downloaded all the latest stable asterisk, zaptel, addons and sounds, and yum install , configured MYSQL, following every step as per ROB’s CentOS-4.3 Installation Walkthrough.

So far so good, the system is up and running now. I enabled MG2 echo canceller and the voice is clear.
[/quote]
How / where did you enable MG2 echo can?


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

Actually, it’s a problem with your /etc/asterisk/asterisk.conf - it’s got ‘astrundir’ set to ‘/var/run’ rather than ‘/var/run/asterisk’. 2.2 won’t let you continue if that is set that way and dies with an error, telling you to change it to /var/ruin/asterisk

–Rob

In the zconfig.h of your Zaptel source directory.

Refer to http://kb.digium.com/index.php?View=entry&CategoryID=1&EntryID=1

[quote=“xrobau”]Actually, it’s a problem with your /etc/asterisk/asterisk.conf - it’s got ‘astrundir’ set to ‘/var/run’ rather than ‘/var/run/asterisk’. 2.2 won’t let you continue if that is set that way and dies with an error, telling you to change it to /var/ruin/asterisk

–Rob[/quote]

Was this a reply to my issue?

If so I will try this out and see if it fixes the issue. Why does this occur?

Hi All,

I am trying to setup FreePBX on CentOS-4.4, I started with the installation of CentOS 4.3 and did all the upgrades, which upgraded to CentOS-4.4, I have followed ROB’s CentOS-4.3 Installation Walkthrough but stuck with the error below, I have rechecked my entries several times and have now done about 4 installs but get the same error. Rob has made this post [quote] Connecting to database…FAILED
Try running ./install_amp --username=user --password=pass (using your own user and pass)
FATAL Cannot connect to database
[email protected]:/usr/src/freepbx#
It means that you haven’t done the ‘GRANT ALL PRIVILEGES …’ command in MySQL, or, you’ve put the wrong password in when you were doing the installation [/quote]

What am I doing wrong here?? Please help :frowning:

StillLearning wrote:

[quote] Hi All,

I am trying to setup FreePBX on CentOS-4.4, I started with the installation of CentOS 4.3 and did all the upgrades, which upgraded to CentOS-4.4, I have followed ROB’s CentOS-4.3 Installation Walkthrough but stuck with the error below, I have rechecked my entries several times and have now done about 4 installs but get the same error. Rob has made this post [quote] Connecting to database…FAILED
Try running ./install_amp --username=user --password=pass (using your own user and pass)
FATAL Cannot connect to database
[email protected]:/usr/src/freepbx#

It means that you haven’t done the ‘GRANT ALL PRIVILEGES …’ command in MySQL, or, you’ve put the wrong password in when you were doing the installation /quote]

What am I doing wrond here?? Please help
[/quote]
I’ve attached my cheat sheet. It probably could use updating a little
but hopefully it will help… Also note that I use a modified Amportal
startup script that is RPM aware so you might want to skip the part
about linking /etc/init.d/amportal and running chkconfig to activate it
on boot.

Andrew

           +-+-+-+-+-+ +-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+
           |L|i|n|u|x| |S|y|s|t|e|m|s| |E|n|g|i|n|e|e|r|s|
           +-+-+-+-+-+ +-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+
  _      _                     _____           _
 | |    (_)                   / ____|         | |
 | |     _ _ __  _   ___  __ | (___  _   _ ___| |_ ___ _ __ ___  ___
 | |    | | '_ \| | | \ \/ /  \___ \| | | / __| __/ _ \ '_ ` _ \/ __|
 | |____| | | | | |_| |>  <   ____) | |_| \__ \ ||  __/ | | | | \__ \
 |______|_|_| |_|\__,_/_/\_\ |_____/ \__, |___/\__\___|_| |_| |_|___/
                                      __/ |
                                     |___/
             ______             _
            |  ____|           (_)
            | |__   _ __   __ _ _ _ __   ___  ___ _ __ ___
            |  __| | '_ \ / _` | | '_ \ / _ \/ _ \ '__/ __|
            | |____| | | | (_| | | | | |  __/  __/ |  \__ \
            |______|_| |_|\__, |_|_| |_|\___|\___|_|  |___/
                           __/ |                   ( I N C )
                          |___/

AMP INSTALLATION INSTRUCTIONS - CentOS 4.0

  • This document is largely derived from the INSTALL document that is
    provided in the AMP tarball.

  • Please read all of the documentation that comes with AMP

  • send comments / questions regarding the installation document to

    [email protected]

Software Prerequisites

##########################

Ensure that the following Centos packages are installed:

curl sox httpd mysql mysql-server php php-pear php-mysql openssl
perl bison libtiff-devel openssl-devel mysql-devel ncurses-devel
audiofile-devel

Install the following LSE packages:

asterisk asterisk-addons asterisk-sounds asterisk-zaptel
asterisk-libpri	lame perl-asterisk-perl	perl-IPC-Signal
perl-Net-Telnet perl-Proc-WaitStat perl-mime-construct

If using zaptel modules install the matching kernel and reboot the system
to activate it.

Once the above RPMS’s are installed, proceed with installing AMP from the
distribution tarball which is available from:

http://sourceforge.net/projects/amportal

Setting up the environment

##############################

AMP requires the following changes to php and apache for uploading new MOH
files:

- vi +501 /etc/php.ini
	upload_max_filesize=20M
- vi +20 /etc/httpd/conf.d/php.conf
	LimitRequestBody 20000000

- you might also need to set register_globals = on in the php.ini for
  displaying CDR logs in the AMP interface

Two new databases must be created in MySQL:

- start mysqld with "service mysqld start"
- mysqladmin -u root password 'db_root_pwd'
- mysqladmin create asteriskcdrdb -p
- mysql --user=root --password=db_root_pwd -p asteriskcdrdb \
	< {AMP_source_directory}/SQL/cdr_mysql_table.sql

- mysqladmin create asterisk -p
- mysql --user root -p asterisk \
	< {AMP_source_directory}/SQL/newinstall.sql

Grant access to these two databases you just created

- Note the default mysql username/password is asteriskuser/amp109.
- If you change either of these, you will be prompted for them while
  running ./install below

	- mysql --user root -p

	mysql>	GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO
		[email protected] IDENTIFIED BY 'amp109';
	Query OK, 0 rows affected (0.00 sec)

	mysql>	GRANT ALL PRIVILEGES ON asterisk.* TO
		[email protected] IDENTIFIED BY 'amp109';
	Query OK, 0 rows affected (0.00 sec)

	mysql> quit

Modify the asterisk user account so that it may be logged in to:

	usermod -s /bin/bash asterisk

Modify zaptel configuration files:

- Edit /etc/sysconfig/zaptel and comment out every "MODULE=" statement
  that is not needed.

- Edit /etc/zaptel.conf to reflect installed Digium telephony card(s).

Only the parameters/values relevant to a wildcard XP100 FXO card are
included below:

	fxsks=1
	loadzone=us
	defaultzone=us

Only the parameters/values relevant to a TDM400P with 4 FXO modules are
included below:

	fxsks=1-4
	loadzone=us
	defaultzone=us

Only the parameters/values relevant to a TE110P (T1 configuration) are
included below:

	span=1,1,0,esf,b8zs
	bchan=1-23
	dchan=24
	loadzone=us
	defaultzone=us

- Start zaptel

	service zaptel start                            [ OK ]
	ztcfg -v

	        Configuration
	        ======================

	        1 channels configured.

If you get a warning about unable to open master device /dev/zap/ctl,
that's ok.  It's a result of the zaptel module(s) not loaded yet.

Detailed information with regard to Asterisk's configuration files can
be found here:
	http://voip-info.org/wiki-Asterisk+config+files

Configure zapata module

- edit /etc/asterisk/zapata.conf to reflect installed digium interfaces
  (see zapata.conf.template)

Only the parameters/values relevant to a Wildcard XP100 FXO card are
included below:

	[channels]
	language=en
	context=from-pstn
	signalling=fxs_ks
	faxdetect=incoming
	usecallerid=yes
	callerid=asreceived
	echocancel=yes
	callprogress=no
	busydetect=no
	echocancelwhenbridged=no
	echotraining=800
	group=0
	channel=1

Only the parameters/values relevant to a TDM400P with 4 FXO modules are
included below:

	[channels]
	language=en
	context=from-pstn
	signalling=fxs_ks
	faxdetect=incoming
	usecallerid=yes
	callerid=asreceived
	echocancel=yes
	callprogress=no
	busydetect=no
	echocancelwhenbridged=no
	echotraining=800
	group=0
	channel=1-4

Only the parameters/values relevant to a TE110P (T1 configuration) are
included below:

	[channels]
	language=en
	context=from-pstn
	switchtype=national
	pridialplan=national
	signalling=pri_cpe
	faxdetect=incoming
	usecallerid=yes
	echocancel=yes
	callerid=asreceived
	echocancelwhenbridged=no
	echotraining=800
	group=0
	channel=1-23

Note: if your configuration is using zap channels as FXS endpoints,
zapata.conf must contain the following line in order to provision these
endpoints in AMP's Extensions admin: #include zapata_additional.conf

Configure httpd (Apache):

- Edit /etc/httpd/conf/httpd.conf so that:

	User asterisk
	Group asterisk

- You should secure your AMP admin directory by creating the 
  file /etc/httpd/conf.d/amp.conf and adding:

	#Password protect AMP admin
	<Directory /var/www/html/admin>
	  AuthType Basic
	  AuthName "Restricted Area"
	  AuthUserFile /var/www/amppasswd
	  Require user wwwadmin
	</Directory>

- now create the password file:

	htpasswd -c /var/www/amppasswd wwwadmin

Finally, run the “install” script to install all the AMP files:

	- /usr/src/AMP/install_amp

Amportal Control Script

##############################

A script to start and stop AMP is located in /usr/sbin. On CentOS /
RedHat systems, the script should be modified so that the system
controls starting and stopping the service on boot / shutdown. Edit
the script and insert the following after the first line:

	#
	#   chkconfig: 2345 45 55
	#   description: Startup / Shutdown Asterisk Management Portal

Once the script is modified, link the file to /etc/init.d and run
chkconfig to add the service to the init scripts.

	ln -s /usr/sbin/amportal /etc/init.d/amportal
	chkconfig amportal --add

Auto Start

##############################

To ensure the system will load after a reboot:

- As root run:

	chkconfig mysqld on
	chkconfig httpd on
	chkconfig amportal on
	chkconfig zaptel on
	chkconfig asterisk on

- The system will now start and stop AMP automatically on each reboot.

- To start amportal and asterisk without rebooting, run:

	service mysql start
	service httpd start
	service zaptel start
	service asterisk start
	service amportal start

- Point your browser to:

	http://[ip address]
  • End of installation instructions

==== install_amp LOG ==========================================================
Enter your USERNAME to connect to the ‘asterisk’ database:
[asteriskuser]
Enter your PASSWORD to connect to the ‘asterisk’ database:
[amp109]
Enter the hostname of the ‘asterisk’ database:
[localhost]
Enter a USERNAME to connect to the Asterisk Manager interface:
[admin]
Enter a PASSWORD to connect to the Asterisk Manager interface:
[amp111]
Enter the path to use for your AMP web root:
[/var/www/html]

Enter the path to use for your FOP web root:
[/var/www/html/panel]

Created /var/www/html/panel
Enter the path to your Apache cgi-bin:
[/var/www/cgi-bin]
Enter the IP ADDRESS or hostname used to access the AMP web-admin:
[xx.xx.xx.xx] 192.168.1.x
Enter a PASSWORD to perform call transfers with the Flash Operator Panel:
[passw0rd]
Use simple Extensions [extensions] admin or separate Devices and Users [deviceanduser]?
[extensions]
Enter directory in which to store AMP executable scripts:
[/var/lib/asterisk/bin]

Created /var/lib/asterisk/bin
Enter directory in which to store super-user scripts:
[/usr/sbin]

/etc/amportal.conf writtenOK
Reading /etc/amportal.conf…OK
Checking for /etc/asterisk/asterisk.conf…OK
Reading /etc/asterisk/asterisk.conf…OK
Connecting to database…OK
Checking current version of AMP…1.10.010
Installing new AMP files…OK
Configuring install for your environment…OK
Setting permissions on files…OK
Checking for upgrades…0 found
Generating AMP configs…
Generating extensions_additional.conf…
Generating sip_additional.conf…
No sip accounts defined in sip
Generating zap_additional.conf…
No zap accounts defined in zap
Generating iax_additional.conf…
No iax accounts defined in iax
Generating meetme_additional.conf…
No extensions defined in extensions
Generating queues_additional.conf…
No queues defined in queues
Generating op_buttons_additional.conf…
Notice: no devices defined
Notice: no Queues defined
Notice: no sip trunks defined
Notice: no iax trunks defined
Notice: no AMP Users defined
Generating AMP configs…OK
Restarting Flash Operator Panel…op_server.pl: no process killed
OK
Please Reload Asterisk by visiting http://192.168.1.x/admin
==== install_amp LOG ==========================================================

EOF - 01.16.06 - [email protected]


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

Hi Andrew,

Thankyou for your prompt reply, for some reason I just could not get it working.