FreePBX 2.11 w/ Asterisk 11

really appreciate all the help. i am going to try it right now. just got up a clean vm.

ok

Ok done. I’ll spin up a VM in a few hours and run through my steps and see. So I can’t say 100% that it will work for you.

thank you very much i really appreciate the help.

Finally!! i got it working. Had to do a little tweaking of the info you provided and a few minor mods and BAM!. its online now. i can’t thank you enough for the help you guys provided.

and dicko. I am going to make a step by step guide for this and post it up just for you.

Well done and tThanks Steel Rein, although I don’t need it, I’m sure many others will appreciate it.

I am a huge fan of ubuntu server and I have been looking for a step by step guide that will work on 12.04. Eagerly awaiting the guide! Thanks in advance for the work you have all put into it. I can’t wait to finally get 'er done :smiley:

I’d like to point out for any noobs like myself that are reading this thread, running the “svn checkout http://svn.freepbx.org freepbx” command is a bad idea if you have limited space to work with. I have files from 2.2 - 2.9 but sadly I woke up to find my disk out of space this morning. Now I will be starting over using the tarball instead :wink:

You can be more granular, I use

mkdir -p /usr/src/freepbx
cd /usr/src/freepbx
svn co http://www.freepbx.org/v2/svn/freepbx/branches/${VER_FREEPBX}
cd ${VER_FREEPBX}
.
.

where VER_FREEPBX can be anything from 2.1 through 2.11 This is very good for migrating TrixBox and Elastix systems when needed.

To fix the Document root add

sed -i ‘s|/var/www|/var/www/html|g’ /etc/apache2/sites*/*

then http://myserver will also work.

I suggest that you use SVN as I previously posted:-

export VER_FREEPBX=2.11
svn co http://www.freepbx.org/v2/svn/freepbx/branches/${VER_FREEPBX}

(you don’t need/shouldn’t use asterisk-addons past asterisk 1.8)

that way you can use install the version of your choice

you probably need to add in make menuselect under add-ons format_mp3 and app_mysql and cdr_mysql to get cdr’s to work, you can add the extra sounds and formats if you want them there as well. These changed will be reflected in the

menuselect.makeopts
menuselect.makedeps

files if you want to reuse them again

you will need to run before “makeing”

contrib/scripts/get_mp3_source.sh

from the asterisk directory to get mp3 and MOH working properly.

you might want to add

make config

to get the init scripts installed.

/etc/default/asterisk

needs editing so asterisk runs as the user:group asterisk.

after FreePBX is installed

then

amportal a ma installall
amportal a reload

will save some time getting “uptodate”

Nice work !!

I have built a step by step guide on how to install Asterisk 11 and FreePBX 2.11 on Ubuntu 12.04 LTS. I am going to be testing it out today to work out any -glitches in the matrix-. As soon as I verify everything is ok, I will post it on this thread.

Be Patient,

Steel

***DISCLAIMER: I don’t proceed to think I know everything. So maybe TM1000 and/or dikco can take a look and see if I left anything out. So far I have not found any issues working on my system. SO FAR…

And now without further adieu…

Install Ubuntu 12.04 LTS 32 or 64-bit

Select OpenSSH and LAMP Server options.

Configure root password.

sudo passwd root

Update system and reboot to make changes take effect.

sudo aptitude update && sudo aptitude upgrade -y

Install dependencies.

*If you are using Ubuntu Desktop 12.04 LTS 32-bit, then you might have to install aptitude.

sudo apt-get install aptitude -y

**If this is a new install and you selected OpenSSH and LAMP as stated above, then install:

aptitude install -y build-essential linux-headers-`uname -r` bison flex php5 php5-curl php5-cli php5-mysql php-pear php-db php5-gd curl sox libncurses5-dev libssl-dev libmysqlclient15-dev mpg123 libxml2-dev libnewt-dev sqlite3 libsqlite3-dev

***If this is an existing install, then you will need to install:

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

Reboot server

reboot

Setup pear database

pear install db

Download Asterisk source files.

cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-addons-1.6.2.4.tar.gz

Compile and install DAHDI.

tar xvfz dahdi-linux-complete-current.tar.gz
cd dahdi-linux-complete-2.6.1+2.6.1
make all
make install 
make config

=============================================================================
!!!WARNING!!! There is a known bug for LIBPRI 1.4.13. ‘make’ will error out with an ‘pritest.c:71:8’ error. You can find the bug report here. To correct this error follow these steps:

Download patch.

wget https://issues.asterisk.org/jira/secure/attachment/44869/fix_unused_write.patch

Rename file.

mv fix_unused_write.patch pritest.patch

Patch the pritest.c file.

patch pritest.c pritest.patch

=============================================================================
Compile and install LIBPRI.

cd ..
tar xvfz libpri-1.4-current.tar.gz
cd libpri-1.4.13
make
make install

Compile and install Asterisk

cd ..
tar xvfz asterisk-11-current.tar.gz
cd asterisk-11.0.1
./configure
make menuselect
make
make install
make samples

Configure and instlal Asterisk-addons.

cd ..
tar xvf asterisk-addons-1.6.2.0.tar.gz
cd asterisk-addons-1.6.2.0
./configure
make
make install

Finally, compile and extract Asterisk-Extra-Sounds

cd /var/lib/asterisk/sounds wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-gsm-current.tar.gz tar xvfz asterisk-extra-sounds-en-gsm-current.tar.gz

Download and extract FreePBX.

cd /usr/src
wget http://mirror.freepbx.org/freepbx-2.11.0beta1.tar.gz
tar xvfz freepbx-2.11.0beta1.tar.gz
cd freepbx-2.11.0beta1
cp amportal.conf /etc/

Now create Asterisk user and set ownership permissions.

adduser asterisk --disabled-password --no-create-home --gecos "Asterisk User"
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/

A few small modifications to Apcahe.

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

Configure Asterisk database in MYSQL.

export MYSQL_ROOT_PW=[i]ROOTPASSWORD[/i] 
export ASTERISK_DB_PW=[i]ROOTPASSWORD[/i] 
mysqladmin -u root -p${[i]MYSQL_ROOT_PW[/i]} create asterisk
mysqladmin -u root -p${[i]MYSQL_ROOT_PW[/i]} create asteriskcdrdb 
mysql -u root -p${[i]MYSQL_ROOT_PW[/i]} asterisk < SQL/newinstall.sql 
mysql -u root -p${[i]MYSQL_ROOT_PW[/i]} asteriskcdrdb < SQL/cdr_mysql_table.sql 
mysql -u root -p${[i]MYSQL_ROOT_PW[/i]}

Set permissions on MYSQL database.

GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY "${[i]ASTERISK_DB_PW[/i]}";
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY "${[i]ASTERISK_DB_PW[/i]}";
flush privileges; 
exit

Restart Asterisk and install FreePBX.

./start_asterisk start
./install_amp

** If “. /install_amp” fails to run correctly, in terminal type:

./install_amp --username=root --password=[i]ROOTPASSWORD[/i]

Finally, one last mod and start FreePBX.

ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3
amportal start

Finally you can open your web browser and navigate to:

http://yourlocalipaddress/html

or if you prefer

http://localhost/html

=============================================================================

After you enable and update the modules in FreePBX You will see the following error.

Symlink from modules failed

To correct this error do the following.

Delete the list of failed files
Example:

cd /etc/asterisk
rm ccss.conf confbridge.conf features.conf sip.conf iax.conf logger.conf extensions.conf sip_notify.conf

Then on the FreePBX webUI got to the ‘Module Admin’ and uninstall and reinstall the ‘Camp On’ module. This should resolve the Symlink issue.

about this message I see on the status screen?

No email address for online update checks
Ignore this
You are automatically checking for online updates nightly but you have no email address setup to send the results. This can be set on the General Tab. They will continue to show up here.
Added 15 minutes ago
(freepbx.NOEMAIL)

I can’t find it’s equal in the ‘Advanced Settings’ menu.

About the code stretching across five monitors. Its was the only way I could do it to allow people to just copy/paste straight from the this site.

If you would like to have the original word doc. you can download it from here.

Advice. If you don’t “make samples” you won’t need to delete the failed symlinks. Therefore DON’T run make samples!!!

tm1000
Do you mean the make samples in the asterisk install process?

I noticed that the “General Setting” link is missing under the “Settings” drop down.

You set it in module admin. Click the giant shield

How did I miss that???

Ahhh! I see. Thanks so much for pointing that out :slight_smile: