1.2.13 to upgrade nightmare

Hello there
I have upgraded from asterisk 1.2.13 to Have tried as much as I can think of to date to resolve these issues:

Case 1 - as installed. With the sample asterisk 1.4.21 config files, I can connect to the CLI (after changing permissions on the /var/run dir to 777…this is prob. not secure!). There is no logging. asterisk.pid and asterisk.ctl are both in /var/run/asterisk. Typng ‘manager show users’ at the CLI indicates there are NO users. I could not connect to asterisk manger via the freepbx guie.

Case 2.
I had backed up, so replaced the original asterisk-1.2.13 /etc/asterisk files into the working directory, and renamed the samples directory to /etc/asterisk_1. I found I could then connect to the asterisk manager (no more warning labels!) but this time, not to the CLI via asterisk -rvvvvvv (it questions if /var/run/asterisk.ctl exisits…ie not /var/run/asterisk/asterisk.ctl but /var/run/aterisk.ctl !!
But grep shows that “/var/run/asterisk” (& not /var/run) appears in all of the following:
/etc/asterisk/asterisk.conf:astrundir => /var/run/asterisk
/etc/asterisk/extensions_additional.conf:ASTRUNDIR = /var/run/asterisk
/etc/asterisk_1/asterisk.conf:astrundir => /var/run/asterisk

where the /etc/asterisk_1 dir is the renamed samples dir (ie from /etc/asterisk before restoration), and the current /etc/asterisk dir is a restored backed up one

Also, logging works!

The funny thing is that when using the restored /etc/asterisk/ files

  1. I can see asterisk.pid & asterisk.ctl in /var/run and
  2. in /etc/asterisk.conf, under [directories], we see:
    astetcdir => /etc/asterisk
    astmoddir => /usr/lib/asterisk/modules
    astvarlibdir => /var/lib/asterisk
    astdatadir => /var/lib/asterisk
    astagidir => /var/lib/asterisk/agi-bin
    astspooldir => /var/spool/asterisk
    astrundir => /var/run/asterisk
    astlogdir => /var/log/asterisk

amportal.conf also lists:

so just repeating, with the restored 1.2.13 /etc/asterisk/files (case 2), I cannot connect to remote asterisk (ie the CLI ) and logging works. Also I can connect to the asterisk manager in freepbx

I have tried putting relevant config information into http.conf and manager.conf, but still not luck.

Is there some hard coding there, should freepbx be reinstalled??


How important is this system (is it live/production or a customer pbx)?
What are the problems now?

I had something similar happen when upgrading one box to 1.6 from 1.4 - had to use the old asterisk.conf for no problems.

Asterisk sets the default astrundir as /var/run, not /var/run/asterisk. This is specified in the default.h file in the installation package’s root directory. I am not sure of the situation in asterisk 1.6. This means;

  1. via the command asterisk -r you cannot connect to the asterisk CLI after installing asterisk You get the message:
    Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?). However, you can run asterisk.

  2. after installing your asterisk as above, if you reinstall freepbx (freepbx 2.5.1 version in my case - and asterisk of course must be running to install freepbx) and run the command amportal start, you get this message:
    astrundir in /etc/asterisk/asterisk.conf is set to ‘/var/run’ - THIS IS WRONG.
    Please change it to something sensible (eg, ‘/var/run/asterisk’) and re-run install_amp

  3. You cannot stop asterisk via amportal stop. You must use the kill command after nominating the correct process to kill (which you can find via the command ps aux).

I found that the appropriate setting to change to in /etc/asterisk/asterisk.conf, under the heading [directories], was:
astrundir => /var/run/asterisk
(and asterisk must be restarted for the change to take effect).

I also found that asterisk 1.2 uses the heading [global] instead of the heading [directories] in asterisk 1.4, so you must also change that heading manually to [directories] if upgrading from 1.2 to 1.4 but keeping your /etc/asterisk/ files.