FreePBX 2.11 w/ Asterisk 11

some form of documentation would be great. This is not an easy process for someone trying to learn all this stuff. I do my research but there are so many conflicting answers out there that it would be awesome if there was a definitive guide as i mentioned before.

This is outdated but will help: http://randystech.com/index.php?option=com_content&view=article&id=89:install-asterisk-on-ubuntu-1004&catid=4:linux-server&Itemid=8

To my knowledge there is not that beast, as tm1000 said we try to make it work but someone else will need to write the documentation.

I thought you offered to write the definitive guide :wink: How is going so far?

and what exactly is part of that? looking for a response in something to the effect of:

aptitude install -y build-essential linux-headers-uname -r openssh-server bison flex apache2 php5 php5-curl php5-cli php5-mysql php-pear php-db php5-gd curl sox libncurses5-dev libssl-dev libmysqlclient15-dev mpg123 libxml2-dev

You are right. We do need better documentation. We are working on that with the new site and perhaps we can work on a quick install guide for CentOS and Ubunutu.

I would be willing to help with that. I am trying to put one together now for this setup. and i have seen that randy tech site in the past. i used it to build my first asterisk+freepbx machine. working out well.

I use these in my standard installs:-

aptitude -y install linux-source-$KERNEL_VERSION linux-headers-$KERNEL_VERSION_FULL
apache2 apache2.2-common apache2-mpm-prefork apache2-utils apt-show-versions
bison build-essential bzip2 curl dnsmasq dnsmasq-base ethtool g++ giflib-tools imagemagick iptraf
tftpd-hpa hdparm jack kernel-package libapache2-mod-perl2 libapache2-mod-php5 libasound2
libasound2-dev libaudiofile-dev libauthen-pam-perl libiksemel3 libiksemel-dev
libiksemel-utils libio-pty-perl libmysqlclient-dev libncurses5-dev
libnet-ssleay-perl libnewt-dev libogg-dev libpam-runtime libqt4-core
libqt4-gui libsnmp15 libsnmp-base libsnmp-dev libspandsp-dev libspeexdsp-dev
libsqlite3-dev libsqlite3-0 libtiff4-dev libtonezone-dev libusb-dev
libvorbis-dev libwww-perl libxml2-dev linux-libc-dev mc mysql-client
gawk mysql-server nmap ntp ntp-doc ntpdate openssl perl php5 php5-cli
php5-common php5-curl php5-dev php5-gd php5-imap php5-ldap
php5-mcrypt php5-mhash php5-mysql
php5-odbc php-db php-file php-mail php-mail-mime php-pear python rcconf
resample rsync screen selinux-utils sqlite subversion tcpdump unixodbc-bin
unixodbc-dev unzip vlan zip zlib1g-dev
iftop htop ngrep sudo ghostscript expect screen
dialog mtr tcpdump libwww-perl mlocate openvpn
sysstat openssh-server postfix dos2unix console-data
apache2-suexec debtags info2www

IWFM but YMMV as I use Debian Squeeze and I support t38 modems and hylafax and avantfax etc.

Thanks dicko!

any help with this error?

root@LinuxTestVM:/usr/src/freepbx-2.11.0beta1# amportal start

Fetching FreePBX settings with gen_amp_conf.php…
PHP Fatal error: require_once(): Failed opening required ‘/var/www/html/admin/libraries/modulelist.class.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /var/www/admin/functions.inc.php on line 167

PHP Fatal error: require_once(): Failed opening required ‘/var/www/html/admin/libraries/modulelist.class.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /var/www/admin/functions.inc.php on line 167
**** WARNING: ERROR IN CONFIGURATION ****
astrundir in ‘/etc/asterisk’ is set to but the directory
does not exists. Attempting to create it with: 'mkdir -p ’

mkdir: missing operand
Try `mkdir --help’ for more information.
**** ERROR: COULD NOT CREATE ****
Attempt to execute 'mkdir -p ’ failed with an exit code of 1
You must create this directory and the try again.

Is apache2 setup and running as I suggested with the right docroot and the right ownership?

ps aux|grep apache

ls -l /var/www/html/

grep -r asterisk /etc/apache2/*

grep -r DocumentRoot /etc/apache2/*

yes

You dont have files in /var/www/html

i wiped out the vm i am starting over. this is getting to be very frustrating. i am going to try once more. if not then i will just give up and use asterisk 1.8+freepbx 2.10 until there is better docs on the 11’s.

and i used the randytech guide and just replace the asterisk and frepbx packages with the latest versions and adding sqlite3 and that is how i got that error.

I dont know what the problem is. I just setup ubuntu 12.04LTS and freepbx 2.11 and asterisk 11 and it worked fine. Maybe because I’m a developer but I dont know. I just didnt find it hard at all.

There are also fully compiled distros. Why you HAVE to do this by hand is beyond me.

but if you could send me your notes on how you installed everything that would be great. i am sure that i am missing something that is probably really stupid.

i am starting with a clean ubuntu 12.04 lts 64bit install with the options of openssh and lamp selected during install.

not sure if i need to cover any other dep’s then that. maybe sqlite3 and libsqlite-dev not sure about any other.

Firstly your system is fudged. I’d start over I don’t want to start in the middle of some hosed system.

Lets assume you installed asterisk with something like

Asterisk Stuff

cd asterisk-11.1.0-rc1
make clean
./configure
make menuselect
make
make install
cd /var/lib/astersik/sounds
wget -O - http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-gsm-current.tar.gz | tar xvfz -

Install deps for FreePBX

apt-get install php-pear
pear install db

Install FreePBX from SVN (with Future GIT Support)

apt-get install subversion git
cd /srv
svn checkout http://svn.freepbx.org freepbx

This will probably take a century. You don’t have to checkout the freepbx svn and could probably extract the 2.11 package there instead

Add Asterisk User and then have that user own asterisk and html

adduser asterisk
chown asterisk. /var/run/asterisk
chown -R asterisk. /etc/asterisk
chown -R asterisk. /var/{lib,log,spool}/asterisk
mkdir /var/www/html
chown -R asterisk. /var/www/

Some apache changes and stuffs (Increase file upload size and user nobody/apache needs to be asterisk

sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php5/apache2/php.ini
cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf_orig
sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/apache2/apache2.conf
service apache2 restart

Setup mysql database for freepbx and cdrs (cdrs wont work)

cd /var/srv/freepbx
export MYSQL_ROOT_PW=1234
export ASTERISK_DB_PW=amp109
mysqladmin -u root -p${MYSQL_ROOT_PW} create asterisk
mysqladmin -u root -p${MYSQL_ROOT_PW} create asteriskcdrdb
mysql -u root -p${MYSQL_ROOT_PW} asterisk < SQL/newinstall.sql
mysql -u root -p${MYSQL_ROOT_PW} asteriskcdrdb < SQL/cdr_mysql_table.sql
mysql -u root -p${MYSQL_ROOT_PW} <<-END_PRIVS
GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY "${ASTERISK_DB_PW}";
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY "${ASTERISK_DB_PW}";
flush privileges;
END_PRIVS

Install FreePBX AFTER starting asterisk

./start_asterisk start
./install_amp

Just hit enter on every prompt.

Finally load ALL modules.

amportal restart

I’m going though my history right now and I’m going to edit the above so wait a second