Freepbx Cannot connect to Asterisk Manager with admin Asterisk may not be running

Hello…,
I’m newbie in this field, i have to do final project in my college…,
and I have plan to create IVR system in ny finall project,

I have install asterisk, n freepbx in linux ubuntu 10.10,
but I got problem:


Reload failed because retrieve_conf encountered an error: 1

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…Tue, 11 Jan 2011 14:10:36 +0700 - Unable to connect to manager 127.0.0.1:5038 (111): Connection refused
FAILED
[FATAL] Asterisk Manager Connection Failure Failed to connect to the Asterisk manager through port: 5038

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


root@laptop:/home/andreas# pico /etc/asterisk/manager.conf
;
; Asterisk Call Management support
;
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0

[admin]
secret = amp111
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user

#include manager_additional.conf
#include manager_custom.conf


root@laptop:/home/andreas# amportal start

SETTING FILE PERMISSIONS
Permissions OK

STARTING ASTERISK
Asterisk ended with exit status 1
Asterisk died with code 1.
Automatically restarting Asterisk.
Asterisk ended with exit status 1
Asterisk died with code 1.
Automatically restarting Asterisk.


root@laptop:/home/andreas# pico /etc/amportal.conf

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’

AMPDBHOST=localhost

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

AMPDBUSER=asteriskuser

AMPDBENGINE: the type of database to use

AMPDBENGINE=mysql

AMPDBPASS: the password for AMPDBUSER

AMPDBPASS=amp109

AMPENGINE: the telephony backend engine to use

AMPENGINE=asterisk

AMPMGRUSER=admin

AMPMGRPASS: the password for AMPMGRUSER

AMPMGRPASS=amp111

AMPBIN: where command line scripts live

AMPBIN=/var/lib/asterisk/bin

#AMPSBIN: where (root) command line scripts live
AMPSBIN=/usr/local/sbin

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

AMPWEBROOT=/var/www/freepbx

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

AMPCGIBIN=/var/www/cgi-bin

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

#AMPWEBADDRESS=192.168.1.101
AMPWEBADDRESS=xx.xx.xx.xx

FOPWEBROOT:web root for the Flash Operator Panel

FOPWEBROOT=/var/www/freepbx/panel

FOPPASSWORD: the secret code for performing transfers and hangups in the Fla$

FOPPASSWORD=passw0rd

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

FOPSORT=extension

FOPRUN: set to true if you want FOP started by freepbx_engine (amportal_star$

FOPRUN=true

AUTHTYPE: authentication type to use for web admin

If type set to ‘database’, the primary AMP admin credentials will be the AMP$

valid: none, database

AUTHTYPE=database

AMPADMINLOGO: Defines the logo that is to be displayed at the TOP RIGHT of t$

This enables you to customize the look of the administration s$

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

This image should be 55px in height

AMPADMINLOGO=logo.png

USECATEGORIES: Controls if the menu items in the admin interface are sorted $

or sorted alphebetically with no categories shown (false). De$

#USECATEGORIES=false

AMPEXTENSIONS: the type of view for extensions admin

If set to ‘deviceanduser’ Devices and Users will be administered seperately, a$

If set to ‘extensions’ Devices and Users will me administered in a single scre$

AMPEXTENSIONS=extensions

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

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

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

enable their phone. Most installations should leave this alone. It allows mult$

phones to receive multiple calls on their line appearances.

ENABLECW=yes

#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

CWINUSEBUSY=yes

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

AMPBADNUMBER=true

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

send the generated backup to an ftp server

FTPBACKUP=YES to enable

FTPUSER, FTPPASSWORD, FTPSERVER must be set

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

FTPBACKUP=yes

#FTPUSER=asterisk
#FTPPASSWORD=password
#FTPSUBDIR=mybackupfolder
#FTPSERVER=myftpserver

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.

#SSHBACKUP=yes
#SSHUSER=backups
#SSHRSAKEY=/etc/asterisk/backup_rsa
#SSHSUBDIR=mysubdir
#SSHSERVER=mybackupserver.com

AMPPROVROOT=/var/ftp /tftpboot

AMPPROVEXCLUDE=/var/ftp/exclude-from-file-list

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

#AMPPROVEXCLUDE=/var/ftp/exclude-from-file-list

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

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

CUSTOMASERROR=false

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.

DYNAMICHINTS=true

XTNCONFLICTABORT, BADDESTABORT

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

XTNCONFLICTABORT=false
BADDESTABORT=false

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

SERVERINTITLE=false

USEDEVSTATE = true|false # DEFAULT VALUE false

USEDEVSTATE=true

MODULEADMINWGET=true|false # DEFAULT VALUE false

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$

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 va$

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

MODULEADMINWGET=false

AMPDISABLELOG=true|false # DEFAULT VALUE true

Whether or not to invoke the freepbx log facility

AMPSYSLOGLEVEL=LOG_EMERG|LOG_ALERT|LOG_CRIT|LOG_ERR|LOG_WARNING|LOG_NOTICE|LOG_INFO|LOG_DEBUG|LOG_SQL|SQL $

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

AMPENABLEDEVELDEBUG=true|false # DEFAULT VALUE false

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 t$

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

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$

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

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

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

DASHBOARD_STATS_UPDATE_TIME=integer_seconds

DEFAULT VALUE: 6

DASHBOARD_INFO_UPDATE_TIME=integer_seconds

DEFAULT VALUE: 20

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

FOPDISABLE=true|false # DEFAULT VALUE false

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

ZAP2DAHDICOMPAT=true|false

DEFAULT VALUE: false

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.

AMPDBUSER=asteriskuser
AMPDBPASS=amp109
AMPDBNAME=asterisk
ASTETCDIR=/etc/asterisk
ASTMODDIR=/usr/lib/asterisk/modules
ASTVARLIBDIR=/var/lib/asterisk
ASTAGIDIR=/usr/share/asterisk/agi-bin
ASTSPOOLDIR=/var/spool/asterisk

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.

AMPDBUSER=asteriskuser
AMPDBPASS=amp109
AMPDBNAME=asterisk
ASTETCDIR=/etc/asterisk
ASTMODDIR=/usr/lib/asterisk/modules
ASTVARLIBDIR=/var/lib/asterisk
ASTAGIDIR=/usr/share/asterisk/agi-bin
ASTSPOOLDIR=/var/spool/asterisk


please correct, if my setting is incorrect, thnkyou verymuch

regards