FreePBX not talking to Asterisk?

While messing around with sub-interfaces and vlans, FreePBX displays an error that says that Asterisk is not running. Status indicates it is and so does asterisk -rvv.

I can ping PiaF, I can connect to it using both Webmin and FreePBX. Status indicates the asterisk is running and asterisk -rvv indicates it is running. FreePBX indicates that there is an error and Asterisk is not running.

I’ve stopped and started asterisk using amportal stop/start and restart. Rebooted the server. Stopped asterisk, reloaded the network settings using “service network restart” and then started asterisk. Also running asterisk 1.6

I was making subinterfaces on the eth0 card for vlans: eth0.20 (Data VLAN), eth0.30 (Voice VLAN) and used the main interface eth0 for a management port.

When that went tits up, I tried using two ethernet cards eth0 (VLAN 20) and eth1 (VLAN 30). Same story…

Where would I look to see how FreePBX is linking to Asterisk?

Do you have access to, say, the extensions module?

The extensions module is greyed out. On the main FreePBX page, the section in the lower right called Server Status has Asterisk in red and if you hover over it, the message comes up that “Asterisk is not running”

Hmm, so FreePBX isn’t finding Asterisk. The manager setting are in /etc/amportal.conf. Try logging in with telnet - you may have asterisk configured wrong for your unique setup.

Strangely, I haven’t changed anything except the IP addresses for the NIC(s). I’ll doublecheck amportal.conf and see if there is anything unusual going on there.

Went to the Asterisk CLI and it showed that “ was unable to authenticate”. This means that FreePBX’s username/password wasn’t matching the config files. Normally FreePBX authenticates to Asterisk on the loopback interface about every 5 seconds. You will see the following message every 5 seconds:

== Manager ‘admin’ logged on from
== Manager ‘admin’ logged off from

Checked /etc/amportal.conf and it was correct. Checked /etc/asterisk/manager.conf and it was correct. I’m running PiaF so I ran update-scripts16, update-fixes16 and passwd-master16 (syncs all passwords). Used the same password as before and now everything works.

Checked the config files and nothing had changed but now it works… Don’t know how anything to do with passwords got changed because I was only playing with network card settings.

Thought I’d fixed it last week but no go today. Seems to be an authenticate problem. Here’s the situation:


It’s a crapshoot whether Asterisk is loaded when rebooting the server according to the status command. Sometimes it indicates the “Running Asterisk Version” correctly, othertimes it shows “No” or just “Loading”.

I was playing with VLANs with server 1 so I brought up another server (I have 32 to play with) without VLANs and it does the same thing.

Question: shouldn’t /etc/asterisk/manager.conf have the same admin secret/password as /etc/amportal.conf? After passwd-master16, /etc/amportal.conf had the password updated to the new one but /etc/asterisk /manager.conf still has the default password.

Is safe_asterisk loaded by default? I understand its purpose is to reload asterisk if you have an unreliable system. I’m having trouble stopping and starting asterisk. It seems that I will suddenly get two asterisk runnings plus safe_asterisk.

Also on stopping using “amportal stop” the error messsage: “unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist)” arises. I’ve checked it and it is there including

I am running into the same problem:

Asterisk prints the following message every 5 secs
== Manager ‘admin’ logged on from
== Connect attempt from ‘’ unable to authenticate
== Connect attempt from ‘’ unable to authenticate

I am running Asterisk version : Asterisk
And FreePBX version :

Where can I find the following scripts to download and run:


I am running both(Asterisk and FreePBX ) on CentOS release 5.4 (Final)

Thanks in advance.


The two files you want to modify are /etc/amportal.conf and /etc/asterisk/manager.conf

To change, modify /etc/amportal.conf

AMPMGRPASS=“new password”

and modify /etc/asterisk/manager.conf (both must match) under the [admin] section

secret = =“new password”

Then from the Linux command prompt, type “amportal restart”. And hopefully everything should be synced.

Then you can use FreePBX-Administrator’s menu to add/modify administrator accounts.