Unable to commit Configuration Changes

Hi guys,

I’ve been reading the forums and have been trying to apply some configuration changes in the GUI however I get the following error:

exit: 1
Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking for /etc/amportal.conf …OK
Bootstrapping /etc/amportal.conf …OK
Parsing /etc/amportal.conf …OK
Parsing /etc/asterisk/asterisk.conf …OK
Connecting to database…OK
Connecting to Asterisk manager interface…Thu, 04 Oct 2012 19:09:22 -0400 - Failed to login.
[FATAL] Asterisk Manager Connection Failure Failed to connect to the Asterisk manager through port: 5038

1 error(s) occurred, you should view the notification log on the dashboard or main screen to check for more details.

I have looked through the forums and it seems to all point back to a difference between the /etc/amportal.conf and the /etc/asterisk/manager.conf and mostly to do with the passwords.

I have run through and double checked everything and it all appears to be fine.

I am running the latest version of Centos 6.2 and PIAF FreePBX

These are the outputs of the 2 files /etc/amportal.conf and /etc/asterisk/manager.conf respectively:

This file contains settings for components of the Asterisk Management Portal

Spaces are not allowed!

Run /usr/src/AMP/apply_conf.sh after making changes to this file

AMPDBHOST: the host to connect to the database named ‘asterisk’


AMPDBUSER: the user to connect to the database named ‘asterisk’


AMPDBENGINE: the type of database to use


AMPDBPASS: the password for AMPDBUSER


AMPENGINE: the telephony backend engine to use


AMPMGRUSER: the user to access the Asterisk manager interface




AMPBIN: where command line scripts live


#AMPSBIN: where (root) command line scripts live

AMPWEBROOT: the path to Apache’s webroot (leave off trailing slash)


AMPCGIBIN: the path to Apache’s cgi-bin dir (leave off trailing slash)


AMPWEBADDRESS: the IP address or host name used to access the AMP web admin


FOPWEBROOT:web root for the Flash Operator Panel


FOPPASSWORD: the secret code for performing transfers and hangups in the Flash Operator Panel


FOPSORT: FOP should sort extensions by Last Name [lastname] or by Extension [extension]


FOPRUN: set to true if you want FOP started by freepbx_engine (amportal_start), false otherwise


AUTHTYPE: authentication type to use for web admin

If type set to ‘database’, the primary AMP admin credentials will be the AMPDBUSER/AMPDBPASS above

valid: none, database


AMPADMINLOGO: Defines the logo that is to be displayed at the TOP RIGHT of the admin screen.

This enables you to customize the look of the administration screen.

NOTE: images need to be saved in the …/admin/images directory of your AMP install

This image should be 55px in height


USECATEGORIES: Controls if the menu items in the admin interface are sorted by category (true),

or sorted alphebetically with no categories shown (false). Defaults to true.


AMPEXTENSIONS: the type of view for extensions admin

If set to ‘deviceanduser’ Devices and Users will be administered seperately, and Users will be able to “login” to devices.

If set to ‘extensions’ Devices and Users will me administered in a single screen.


ENABLECW: Enable call waiting by default when an extension is created (DEFAULT is yes)

Set to ‘no’ to if you don’t want phones to be commissioned with call waiting already

enabled. The user would then be required to dial the CW feature code (*70 default) to

enable their phone. Most installations should leave this alone. It allows multi-line

phones to receive multiple calls on their line appearances.


#CWINUSEBUSY: Set to yes for extensions that have CW enabled to report as busy if

they don’t answer (resulting in busy voicemail greeting). Otherwise they simply

report as no-answer (e.g. busy greeting servers no purpose


AMPBADNUMBER: Set to false if you do not want the bad-number context generated which

traps any bogus number or freature code and plays a message to the effect. If you use

the Early Dial feature on some Grandstream phones, you will want to set this to false


The following are used to optionally have the freepbx backup program optionally

send the generated backup to an ftp server



FTPSUBDIR is an optional subdirectory at the ftp server, it will cause ftp to do a cd

There is no error checking so you should check to make sure these are set correctly. The

ftp is saved after the backup, so it will not cause the local backup file to be effected



SSH BACKUP INFO: must have a valid SSHRSAKEY file and server, only supported through

ssh. SUBDIR is optional and will be created if it does not exist.

If SSHUSER is not set, it will default to the current user which is asterisk in any

standard configuration.


AMPPROVROOT=/var/ftp /tftpboot

One or more directories where there are provisioning files that should be included in the backup. Currently

these get backed up only, the FreePBX utility does not automatically restore them.

#AMPPROVROOT=/var/ftp /tftpboot


a list of files to exclude, to be used in tar’s --exclude-from argument


If CUSTOMASERROR is set to false, then the Destination Registry will not report unknow destinations as errors

this should be left to the default true and custom destinations should be moved into the new custom apps registry


if DYNAMICHINTS is set to true, Core will not statically generate hints. Instead it will make a call to the

AMPBIN php script, generate_hints.php, through an Asteirsk’s #exec call. This requires Asterisk.conf to be

configured with “execincludes=yes” set in the [options] section.



setting either of these to true will result in retrieve_conf aborting during a reload if an extension

conflict is detected or a destination is detected. It is usually better to allow the reload to go

through and then correct the problem but these can be set if a more strict behavior is desired

both default to false if not set


SERVERINTITLE if set to true, the browser title will be preceded with the server name. default false


USEDEVSTATE = true|false # DEFAULT VALUE false

If this is set, it assumes that you are running Asterisk 1.4 or higher and want to take advantage of the

func_devstate.c backport available from Asterisk 1.6 which allows custom hints to be created to support

BLF for server side feature codes such as daynight, followme, etc.



Module Admin normally tries to get its online information through direct file open type calls to URLs that

go back to the freepbx.org server. If it fails, typically because of content filters in firewalls that don’t

like the way PHP formats the requests, the code will fall back and try a wget to pull the information.

This will often solve the problem. However, in such environemnts there can be a significant timeout before

the failed file open calls to the URLs return and there are often 2-3 of these that occur. Setting this value

will force FreePBX to avoid the attempt to open the URL and go straight to the wget calls.



Whether or not to invoke the freepbx log facility


Where to log if enabled, SQL, LOG_SQL logs to old MySQL table, others are passed to syslog system to determine where to log


Whether or not to include log messages marked as ‘devel-debug’ in the log system

AMPMPG123=true|false # DEFAULT VALUE true

When set to false, the old MoH behavior is adopted where MP3 files can be loaded and WAV files converted to MP3

The new default behavior assumes you have mpg123 loaded as well as sox and will convert MP3 files to WAV. This is

highly recommended as MP3 files heavily tax the system and can cause instability on a busy phone system.

CDR DB Settings: Only used if you dont use the default values provided by freepbx.

CDRDBHOST: hostname of db server if not the same as AMPDBHOST

CDRDBPORT: Port number for db host

CDRDBUSER: username to connect to db with if its not the same as AMPDBUSER

CDRDBPASS: password for connecting to db if its not the same as AMPDBPASS

CDRDBNAME: name of database used for cdr records

CDRDBTYPE: mysql or postgres mysql is default

CDRDBTABLENAME: Name of the table in the db where the cdr is stored cdr is default

AMPVMUMASK: defaults to 077 allowing only the asterisk user to have any permissions on VM files. If set to something

like 007, it would allow the group to have permissions. This can be used if setting apache to a different

user then asterisk, so that the apache user (and thus ARI) can have access to read/write/delete the

voicemail files. If changed, some of the voicemail directory strucuters may have to be manually changed.





These can be used to change the refresh rate of the System Status Panel. Most of

the stats are updated based on the STATS interval but a few items are checked

less frequently (such as Astersisk Uptime) based on the INFO value


Disables FOP in interface and retrieve_conf. Usefull for sqlite3 or if you don’t want FOP.



If set to true, FreePBX will check if you have chan_dadhi installed. If so, it will

automatically use all your ZAP configuration settings (devices and trunks) and

silently convert them, under the covers, to DAHDI so no changes are needed. The

GUI will continue to refer to these as ZAP but it will use the proper DAHDI channels.

This will also keep Zap Channel DIDs working.

#Piaf specific section


; AMI - Asterisk Manager interface
; FreePBX needs this to be enabled. Note that if you enable it on a different IP, you need
; to assure that this can’t be reached from un-authorized hosts with the ACL settings (permit/deny).
; Also, remember to configure non-default port or IP-addresses in amportal.conf.
; The AMI connection is used both by the portal and the operator’s panel in FreePBX.
; FreePBX assumes an AMI connection to localhost:5038 by default.
enabled = yes
port = 5038
bindaddr =
displayconnects=no ;only effects 1.6+

secret = $amp111
read = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate
write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate

#include manager_additional.conf
#include manager_custom.conf
You have new mail in /var/spool/mail/root

Can anyone help?

I suggest that the $ before amp111 might screw you in php try using another random ascii string

Any suggestions what I should use? (Still a bit new to such deep level of configuration in Linux

Tried another random string - still got the same problem :frowning:

In my work logs the instructions do specifically use the $ symbol so not sure why this discrepancy :frowning:

Ok. So I’ve made some changes (where I have completely removed the $ sign, reloaded the password in under privileges in the FreePBX GUI and it hasn’t crashed anything (which it was doing before for some reason). However I do get another error now:

exit: 1
Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking for /etc/amportal.conf …OK
Bootstrapping /etc/amportal.conf …OK
Parsing /etc/amportal.conf …OK
Parsing /etc/asterisk/asterisk.conf …OK
Connecting to database…OK
Connecting to Asterisk manager interface…OK
[FATAL] Failed to get engine_info retreive_conf failed to get engine information and cannot configure up a softwitch with out it. Error: ERROR-UNABLE-TO-PARSE

1 error(s) occurred, you should view the notification log on the dashboard or main screen to check for more details.

What version of FreePBX? You state 2.0.6, no such thing.

If it is 2.9 or later the manager pass is in /etc/asterisk/freepbx.conf

FreePBX as stated in my web interface GUI

I stated 2.0.6 as it was in the download file.

Sorry for the confusion :frowning:

So I found some more things and after changing this code:


I got another error:

exit: 255 PHP Parse error: syntax error, unexpected T_IF in /var/lib/asterisk/bin/retrieve_conf on line 538

After having a look through it appears that the line referred to wasn’t actually changed by me but this is what is said:

535 $engineinfo = engine_getinfo();
536 $engineinfo[‘engine’]=“asterisk”;
537 $engineinfo[‘version’]=""
538 if($engineinfo[‘version’] == 0){
539 freepbx_log(‘retrieve_conf’, ‘fatal’, “Failed to get engine information (engine_getinfo: {$engineinfo[‘engine’]})”);
540 fatal((“Failed to get engine_info”),(“retreive_conf failed to get engine information and cannot configure up a softwitch with out it. Error: {$engineinfo[‘engine’]}”));

Can anyone help work out what this is?

Verify one more time that /etc/asterisk/manager.com and /etc/amportal.conf match

Then do an amportal restart