Experience the Love of Ubuntu 8.04 & FreePBX 2.5
Date: Oct 08 2008
With my recent endeavor into the world of open-source PBX I decided to write up a step-by-step how to on how to setup Ubuntu 8.04 with FreePBX 2.5. All the how-to’s were out dated and when i setup something I like to have all the new stuff. I will cover Zaptel compiling (not configuration), Astrisk Compiling, Install of FreePBX and configuration. It is recommend that you have prior knowledge of how to use Linux and some Asterisk knowledge. To access a root shell on an Ubuntu system run sudo su. Install Base Ubuntu 8.04 Server.
Install Ubuntu 8.04 Server w/ LAMP server & SSHd
*THIS HOW-TO IS CURRENTLY A WORK IN PROGRESS*
Get the system all up to date
#aptitude upgrade
After that is finish with no errors reboot your system
<strong>I would not recommend installing zaptel or asterisk from apt. It will just cause problems.</strong>
Install Required Packages
# sudo aptitude install cvs build-essential automake autoconf bison flex libtool libncurses5-dev libssl-dev php5 php5-cli php5-curl php5-gd php5-mysql mysql-server php-pear php-db curl sox apache2 subversion libssl-dev libmysqlclient15-dev libcurl4-gnutls-dev
Compile & Installing Zaptel Modules
Next we want to prepare to build the zaptel modules to do we will need the following packages:
# uname -a
# sudo aptitude install linux-headers-$(uname -r)
# sudo ln -s /usr/src/linux-headers-$(uname -r) /usr/src/linux-2.6
# cd /usr/src/
# sudo wget http://downloads.digium.com/pub/zaptel/zaptel-1.4-current.tar.gz
# sudo tar -zxvf zaptel-1.4-current.tar.gz
# cd zaptel-1.4.12.1
# ./configure
# make clean
# make
# sudo make install
# sudo make config
I am not going to go in depth into Zaptel module configuration since there is a ton of great sites out there.
Edit the following config files to your needs: configure /etc/zaptel.conf and /etc/asterisk/zapata.conf
voip-info zaptel config
# sudo /etc/init.d/zaptel start
# sudo update-rc.d zaptel defaults 20 80
Ways to test your Zaptel
# lspci
should have something like this: 02:0a.0 Ethernet controller: Digium, Inc. Unknown device 8005 (rev 11)
# cat /proc/zaptel/*
output similar to:
Span 1: WCTDM/0 “Wildcard TDM410P Board 1″ (MASTER)
IRQ misses: 1
1 WCTDM/0/0 FXSKS (In use)
2 WCTDM/0/1 FXSKS (In use)
3 WCTDM/0/2 FXSKS (In use)
4 WCTDM/0/3 FXSKS (In use)
Testing once Asterisk IS INSTALLED
Access Asterisk CLI
# sudo asterisk -r
In asterisk command line enter : zap show channels
xxx*CLI> zap show channels
output similar to:
Chan Extension Context Language MOH Interpret
pseudo from-pstn default
1 from-pstn default
2 from-pstn default
3 from-pstn default
4 from-pstn default
In asterisk command line enter : zap show status
xxx*CLI> zap show status
output similar to:
Description Alarms IRQ bpviol CRC4
Wildcard TDM410P Board 1 OK 1 0 0
If you have stuff like this showing up your card should be working
Setting Up & Compile Asterisk with Curl Support
# sudo groupadd asterisk
# sudo useradd -c “asterisk PBX” -d /var/lib/asterisk -g asterisk asterisk
# sudo mkdir /var/run/asterisk
# sudo chown asterisk:asterisk /var/run/asterisk/
# cd /usr/src/
# sudo wget http://downloads.digium.com/pub/asterisk/releases/asterisk-1.4.22.tar.gz
# sudo tar -zxvf asterisk-1.4.22.tar.gz
# cd asterisk-1.4.22
# make clean
# ./configure –with-curl
# make
# sudo make install
# sudo make samples
Download Astrisk Add-ons
# cd ..
# sudo wget http://downloads.digium.com/pub/asterisk/asterisk-addons-1.4.7.tar.gz
# sudo tar -zxvf asterisk-addons-1.4.7.tar.gz
# cd asterisk-addons-1.4.7
# sudo perl -p -i.bak -e ‘s/CFLAGS.*D_GNU_SOURCE/CFLAGS+=-D_GNU_SOURCE\nCFLAGS+=-DMYSQL_LOGUNIQUEID/’ Makefile
# ./configure
# make clean
# make
# sudo make install
Download Astrisk Sounds
# cd ..
# sudo mkdir asterisk-sounds
# cd asterisk-sounds
# sudo wget http://downloads.digium.com/pub/telephony/sounds/asterisk-core-sounds-en-wav-current.tar.gz
# sudo wget http://downloads.digium.com/pub/telephony/sounds/asterisk-extra-sounds-en-wav-current.tar.gz
# sudo wget http://downloads.digium.com/pub/telephony/sounds/asterisk-moh-freeplay-wav.tar.gz
# sudo tar -zxvf asterisk-core-sounds-en-wav-current.tar.gz
# sudo tar -zxvf asterisk-extra-sounds-en-wav-current.tar.gz
# sudo tar -zxvf asterisk-moh-freeplay-wav.tar.gz
copy all sounds to the asterisk directory
# sudo cp -rf * /var/lib/asterisk/sounds/
create sim link for MOH (Music on Hold) directory for FreePBX
# sudo ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3
Fix asterisk dir permissions
# chown asterisk:asterisk /etc/asterisk -R
# chown asterisk:asterisk /var/lib/asterisk -R
# chown asterisk:asterisk /var/log/asterisk -R
# chown asterisk:asterisk /var/spool/asterisk/ -R
# nano /etc/asterisk/asterisk.conf
Change astrundir to: /var/run/asterisk
Setting up FreePBX
# cd /usr/src/
# sudo wget http://mirror.freepbx.org/freepbx-2.5.0.tar.gz
# sudo tar -zxvf freepbx-2.5.0.tar.gz
# cd freepbx-2.5.0
# sudo mysql_install_db
# mysqladmin u root password ‘<chosen MySQL Password>’
# mysqladmin create asteriskcdrdb -p
# mysqladmin create asterisk -p
# mysql –user=root –password=<chosen MySQL Password> asterisk < ./SQL/newinstall.sql
# mysql –user=root –password=<chosen MySQL Password>asteriskcdrdb < ./SQL/cdr_mysql_table.sql
Enter Mysql command prompt
# mysql –user root -p
# GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY ‘amp109′;
<enter>
# GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY ‘amp109′;
<enter>
# quit
<enter>
Configure Apache for FreePBX
# sudo nano /etc/apache/envvars
change : export APACHE_RUN_USER=www-data & export APACHE_RUN_GROUP=www-data
to: export APACHE_RUN_USER=asterisk & export APACHE_RUN_GROUP=asterisk
# sudo nano /etc/apache2/sites-enabled/000-default
change: AllowOveride None to AllowOverid All under both instances of /var/www
Configure PHP for FreePBX
# sudo nano /etc/php5/apache2/php.ini
change: upload_max_filesize to upload_max_filesize = 20M
# sudo nano /etc/php5/cli/php.ini
change: upload_max_filesize to upload_max_filesize = 20M
Set the php lib directory to be owned by asterisk so that it can make changes to the php.ini
# sudo chown asterisk:asterisk /var/lib/php5 -R
Set ownership of the /var/www directory to asterisk so it can write to files
# sudo chown asterisk:asterisk /var/www -R
Restart Apache
# sudo /etc/init.d/apache2 restart
In a web browser test http://<server-ip-addresss>/ if all is well you should get a page and your apache is installed and working properly
FreePBX install
# cd /usr/src/freepbx-2.5.0
bash fix for asterisk start script
# sudo ln -sf /bin/bash /bin/sh
# sudo ./start_asterisk start
# sudo ./install_amp
accept defaults on all questions except on:
Enter the path to use for your AMP web root: /var/www
IP address: <server-ip-addresss>
No point a web browser at http://<server-ip-addresss>/admin/ and click on the orange reload config banner at the top of the page
Astrisk Init Script
# sudo nano /etc/init.d/asterisk
paste the following
set -e PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DESC="Asterisk" NAME=amportal DAEMON=/usr/local/sbin/$NAME PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME test -x $DAEMON || exit 0 d_start() { amportal start } d_stop() { amportal stop } d_reload() { amportal restart } case "$1" in start) echo -n "Starting $DESC: $NAME" d_start echo "." ;; stop) echo -n "Stopping $DESC: $NAME" d_stop echo "." ;; restart|force-reload) echo -n "Restarting $DESC: $NAME" d_stop sleep 10 d_start echo "." ;; *) echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 exit 3 ;; esac exit 0 |
<save file>
# sudo chmod 755 /etc/init.d/asterisk
# sudo update-rc.d asterisk defaults 90 10
Activate FOP (Flash Operator Panel)
# sudo nano /etc/amportal.conf
change: FOPRUN=false to FOPRUN=true
*must restart asterisk to take effect in FreePBX
remove old astrisk configs
# sudo rm /etc/asterisk/*.0
Reboot your system and you should have a working Asterisk/FreePBX system up and running
Installing Other Goodies
TFTP server for phone updates and auto configurations
# sudo aptitude install tftpd-hpa tftp-hpa
# sudo nano /etc/default/tftpd-hpa
change: RUN_DAEMON to RUN_DAEMON=”yes”
I make a link to /tftpboot just to make it a little more accessible
# sudo ln -s /var/lib/tftpboot /tftpboot
# sudo /etc/init.d/tftpd-hpa start
# sudo update-rc.d tftpd-hpa defaults
Now put all your firmware updates, phone configs in the /tfptboot directory. Also if your phones use DHCP don’t forget to set the TFTP server address to this server ip so the phones get it automatically assigned.
Changing Mysql Asterisk Username or Password
If you change any of the mysql login cridentials you must update these two files with the new asterisk username and/or password
/etc/asterisk/cdr_mysql.conf
/etc/amportal.conf
Like this article? Please Digg it!
facebook comments:
54 Comments to “Experience the Love of Ubuntu 8.04 & FreePBX 2.5”
Leave a Reply
Good start. Any chance of adding Hylafax integration? Also, suggestions/recommednations for linecards (or, better yet, how to use cheap modem cards with the fee PBX). Thanks!
Never really messed with Hylafax, we alright have a network fax gateway at work provided by one of the copiers. So I doubt I will have the opportunity to play with Hylafax. As far as linecards go, I am using two Digium TDM404B’s 4 FXO ports each. Cards were under 400 bucks. As far as cheap modems go from what I was reading only seem to work on AstriskforWindows. But I could be wrong.
Hi,
Thanks for the article really liked it. I’ve tried several times installing on hardy and have various wierdness which i don’t understand.
Firsly, why did u decide to compile asterisk when theres a recent version in the hardy repos?
Secondly, some writeups talk about adding the “www-data” user to the asterisk group, would that work? My asterisk box is also going to be a small webserver for my intranet – I know theres many ways to skin a cat, just wondering why you made the decisions you made.
thanks
I compiled asterisk just because i wanted it as lean as possible and wanted the latest and greatest. It’s is a really easy compile.
As for www-data vs all asterisk user owned, it doesn’t matter. Looking at it from a security stand point whether web files are owned by asterisk or www-data are one in the same. As far as apache goes vs something like lighthttpd… it’s really personal preference. I just always used apache, i feel comfortable with it.
Hello. What wordpress plugin do you use for code listing? Wery nice plugin.
Thanks for the install instructions above – I have used Asterisk for a few years but just for basic stuff. Now that I need to add some advanced call treatment, your guide for installing FreePBX with Asterisk was very helpful.
However, I’m having problems with FreePBX displaying CDRs – when I click on “Reports”, I get “Fatal error: Call to undefined method DB_Error::numRows() in /var/www/admin/cdr/call-log.php on line 295″
Did I do anything wrong when installing or could there possibly be something missing in your instructions that would cause this?
Wolf: I have added a section which may help you ‘FreePBX Report Fix’. Check it out and let the users know if it helps.
Everything was runing smoothly until I got and error whilrunning the following command inside the “Download Astrisk Add-ons” block
# sudo perl -p -i.bak -e ’s/CFLAGS.*D_GNU_SOURCE/CFLAGS+=-D_GNU_SOURCE\nCFLAGS+=-DMYSQL_LOGUNIQUEID/’ Makefile
here is what I got as result
Unrecognized character \xE2 at -e line 1.
Best regards
Hi Undertoe,
Sorry, my english is too bad but i do my best effort
(do you speak spanish?)
I need to secure my Freepbx so no one can access using web interface without a user/password. I want to put a login screen for security, because it is directly exposed to internet.
How can i add a “Login screen” before “Welcome Screen”?
I have searched a lot, but I only found examples for trixbox using passwd-maint or something like that.
Thank you in advance
Problem solved. I have secred my Web interface using this tutorial:
http://www.cristalab.com/tutoriales/213/proteger-carpetas-con-.htaccess-y-.htpasswd.html
it is in spanish, but it can help anywise.
Now I have another problem:
“Fatal error: Call to undefined method DB_Error::numRows() in /var/www/admin/cdr/call-log.php on line 295″
I have tried the fix posted above, but I got a syntax error
Any idea?
I am looking into asteriskcdrdb database (using phpmyadmin) and it seems to be EMPTY, without tables. Is it right?
Maybe you forget one or more steps near:
# mysqladmin create asteriskcdrdb -p
# mysql –user=root –password= asterisk < ./SQL/newinstall.sql
I think that possible cause is some missing steps. Something like:
# mysqladmin create asterisk -p
# mysql –user=root –password= asteriskcdrdb < ./SQL/cdr_mysql_table.sql
I trying to learn, sorry if i am wrong
Thank you in advance.
I have tried using:
/home/cracker# mysql asteriskcdrdb < /usr/src/freepbx-2.5.0/SQL/cdr_mysql_table.sql -u root -p
PROBLEM SOLVED, no more “Fatal error: Call to undefined method DB_Error::numRows() in /var/www/admin/cdr/call-log.php on line 295″
Thank you!
Undertoe’s instructions for the “FreePBX Report Fix” also work with a little tweaking – you have to enter “use asteriskcdrdb” before you issue the “CREATE” command. Also, some of the quotation marks are incorrect – use two single quotation marks (”) instead of the regular one mentioned above (“).
CDRs work for me now – thanks!
getting error when installing amp
/usr/src/freepbx-2.5.1$ sudo ./install_amp
Checking for PEAR DB..OK
Checking for PEAR Console::Getopt..OK
Checking user..OK
Checking if Asterisk is running..running with PID: 9986..OK
Checking for /etc/amportal.conf..OK
Reading /etc/amportal.conf..OK
Checking for /etc/asterisk/asterisk.conf..OK
Reading /etc/asterisk/asterisk.conf..OK
Using asterisk as PBX Engine
Checking for Asterisk version..1.4.13
Checking for selinux..sh: getenforce: command not found
OK
Connecting to database..OK
Checking current version of AMP..2.5.1
Installing new FreePBX files../etc/asterisk/vm_email.inc has been changed from the original version.
Overwrite (y=yes/a=all/n=no/d=diff/s=shell/x=exit)? y
/etc/asterisk/manager.conf has been changed from the original version.
Overwrite (y=yes/a=all/n=no/d=diff/s=shell/x=exit)? a
OK (504 files copied, 0 skipped)
Configuring install for your environment..amportal..freepbx_engine..done
apply username/password changes to conf files../etc/amportal.conf: line 33: /var/www: is a directory
/etc/amportal.conf: line 43: /var/www/panel: No such file or directory
done
creating missing #include files..OK
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
OK
Setting permissions on files../etc/amportal.conf: line 33: /var/www: is a directory
/etc/amportal.conf: line 43: /var/www/panel: No such file or directory
/etc/amportal.conf: line 33: /var/www: is a directory
/etc/amportal.conf: line 43: /var/www/panel: No such file or directory
chown: cannot access `/admin’: No such file or directory
chmod: cannot access `/admin’: No such file or directory
chown: missing operand after `asterisk:asterisk’
Try `chown –help’ for more information.
chmod: missing operand after `g+w’
Try `chmod –help’ for more information.
chown: cannot access `/recordings’: No such file or directory
chmod: cannot access `/recordings’: No such file or directory
chown: cannot access `/_asterisk’: No such file or directory
chmod: cannot access `/*.pl’: No such file or directory
chmod: cannot access `/safe_opserver’: No such file or directory
OK
Checking for upgrades..No upgrades found
Generating AMP configs..
Generating Configurations.conf, (if Asterisk is not running, you will get an error
In case of error, start Asterisk and hit the red bar in the GUI to generate the Configuraions.conf files
Checking for PEAR DB..OK
Checking for PEAR Console::Getopt..OK
Running module install.php and install.sql scripts
Checking for /etc/amportal.conf ..OK
Bootstrapping /etc/amportal.conf ..OK
Parsing /etc/amportal.conf ..
Warning: require_once(/var/www/html/admin/functions.inc.php): failed to open stream: No such file or directory in /var/lib/asterisk/bin/retrieve_conf on line 183
Fatal error: require_once(): Failed opening required ‘/var/www/html/admin/functions.inc.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /var/lib/asterisk/bin/retrieve_conf on line 183
Generating AMP configs..OK
Restarting Flash Operator Panel..op_server.pl: no process killed
OK
Checking dashboard..
Module successfully installed
The following error(s) occured:
– Module is already enabled
installed
Checking music..
Module successfully installed
The following error(s) occured:
– Module is already enabled
installed
Checking voicemail..
Module successfully installed
The following error(s) occured:
– Module is already enabled
installed
Checking infoservices..
Module successfully installed
The following error(s) occured:
– Module is already enabled
installed
Checking customappsreg..
Module successfully installed
The following error(s) occured:
– Module is already enabled
installed
Checking featurecodeadmin..
Module successfully installed
The following error(s) occured:
– Module is already enabled
installed
Checking recordings..
checking for fcode field..already exists
checking for fcode_pass field..already exists
Module successfully installed
The following error(s) occured:
– Module is already enabled
installed
Checking framework..
The following error(s) occured:
– Module is already enabled
enabled
Checking core..
Checking if directdids need migrating..already done
updating zap callgroup, pickupgroup..not needed
checking for delay_answer field ..already exists
checking for pricid field ..already exists
Checking for Global var RECORDING_STATE..Already exists!
Module successfully installed
The following error(s) occured:
– Module is already enabled
installed
Please update your modules and reload Asterisk by visiting http://192.168.5.104/admin
I got the php error on the reports page, but when I enter the mysql command, i get the error:
mysql> CREATE TABLE `cdr` ( `calldate` datetime NOT NULL default ‘0000-00-00 00:00:00′, `clid` varchar(80) NOT NULL default ”, `src` varchar(80) NOT NULL default ”, `dst` varchar(80) NOT NULL default ”, `dcontext` varchar(80) NOT NULL default ”, `channel` varchar(80) NOT NULL default ”, `dstchannel` varchar(80) NOT NULL default ”, `lastapp` varchar(80) NOT NULL default ”, `lastdata` varchar(80) NOT NULL default ”, `duration` int(11) NOT NULL default ‘0′, `billsec` int(11) NOT NULL default ‘0′, `disposition` varchar(45) NOT NULL default ”, `amaflags` int(11) NOT NULL default ‘0′, `accountcode` varchar(20) NOT NULL default ”, `uniqueid` varchar(32) NOT NULL default ”, `userfield` varchar(255) NOT NULL default ”, PRIMARY KEY (`uniqueid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘‘0000-00-00 00:00:00′, `clid` varchar(80) NOT NULL default ”, `src` varcha’ at line 1
This information was CRUCIAL to getting this installed and running. THANK YOU!
Hi Undertoe
Can u tell me what to modify to make this how to work perfectly on Ubuntu 8.10
I have started and was block just at the beginning on this command
sudo aptitude install linux-headers-2.6.24-19-server
With this message
Couldn’t find any package whose name or description matched “linux-headers-2.6.24-19-server”
Couldn’t find any package whose name or description matched “linux-headers-2.6.24-19-server”
No packages will be installed, upgraded, or removed.
Hello
Is it possible to have the howto install Conference otion inside FreePBX 2.5
):
sudo aptitude install linux-headers-$(uname -r)
should work they have a new kernel version than what’s in this how to. I will update the how to to reflect this command.
@undertoe
Thanks very much,
Can u tell me how to configure Net2phone Sip Trunk?
Hello all I’v followed your instructions but when I start the /etc/init.d/asterisk I get the followin error
STARTING ASTERISK
1024
/usr/sbin/safe_asterisk: 178: Syntax error: Bad fd number
Asterisk Started
Any suggestions??
Thanks in advance
thank’s for the tutorial…
so awsome…
but there are still a bug…
On FreePBX Notice.. apear this message
No email address for online update checks
do you know how to solve that problem?
BEST REGARD…
when i gave this :/usr/src/freepbx-2.5.1/install_amp
i am getting this error…plz tell me wht to do
Checking for PEAR DB..FAILED
[FATAL] PEAR must be installed (requires DB.php). Include path: .:/usr/share/php:/usr/share/pear
how to get rid of this error:-
Asterisk ended with exit status 1
Asterisk died with code 1.
cat: /var/run/asterisk/asterisk.pid: No such file or directory
@Junkiest
go to general settings and put your email under online update checks
Hey, great tutorial man!
I used it before to install in ubuntu 8.04 but now it is not working, I have already tried and everytime the installation goes bad, I do a fresh ubuntu install (completely wipe out the hard drive with a brand new ubuntu 8.04 installation, even tried with ubuntu 8.10) but still it is giving me a hard time, with mysql, it is not recognizing the password I set up at the installation then when I try mysqladmin u root password ‘’ it says it cannot log in root, using password. any thoughts? already read on the internet on the error it was giving me, I read that I am not using the same password from the moment of installation…. any ideas?
Thank you guys in advanced.
G
i hope this will do good
# mysql -u root -p asteriskcdr < ./SQL/cdr_mysql_table.sql
instead of
# mysql -user=root –password= asterisk < ./SQL/cdr_mysql_table.sql
@arun sabarish
Hi,
# pear install DB
should solve your problem. It gives a warning, that MDB2 is the favourite class, but you can ignore this.
Best regards
Stefan
Nice tutorial, thanks for sharing
Question, though. When I execute
#sudo useradd -c “asterisk PBX” -d /var/lib/asterisk -g asterisk asterisk
it fails, showing the options for the useradd command.
Any idea?
hey guys, I was able to go around the mysql admin issue, arunsabaris helped, thanxs!, ok, here is the issue now, when I put in my browser the url/admin it shows:
Not Found
The requested URL /admin was not found on this server.
Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4 with Suhosin-Patch Server at 192.168.1.127 Port 80
when I go to the url alone, I do get the IT WORKS message… any suggestions?
I thank you guys in advanced for your time.
Best regards,
Juan Ojeda
@undertoe
Where is that section? I have been browsing the blog but can’t find it.
hi Juan Ojeda….
try this http://192.168.1.127/asterisk/admin/
or give $ sudo gedit /etc/apache2/sitesenabled/000-default
edit DocumentRoot /var/www/asterisk/
and Directory /var/www/asterisk/
THANKS!!!!!!!!!!!
@Alvaro
Hi Alvaro
try this
$sudo useradd -c “PBX asterisk” -d /var/lib/asterisk -g asterisk asterisk
dont cut n paste..
plz type the command.
@arunsabarish
What distro are you using?
Settingup freepbx, for mysql section should be :
mysqladmin create asteriskcdrdb -p
mysql asteriskcdrdb < /usr/src/freepbx-2.5.0/SQL/cdr_mysql_table.sql
mysqladmin create asterisk -p
mysql -u root -p asterisk < /usr/src/freepbx-2.5.0/SQL/newinstall.sql
@undertoe
This tutorial is totally awesome. Huge help in getting FreePBX configured on my Ubuntu box. Thank you.
I went on to configure sendmail and DNS so that I could get my VM emailed to me and my team. Basically a cakewalk on Ubuntu.
Currently, I’m having 2 problems -
1. with the FOP not loading (probably wouldn’t use this anyway)
2. with the reports page not loading (this would be really useful to me). The error is:
Fatal error: Call to undefined method DB_Error::numRows() in /var/www/html/admin/cdr/call-log.php on line 295
FWIW – line 295 of call-log.php: $num = $res -> numRows();
VERSIONS:
Asterisk 1.4.22
FreePBX 2.5.1.1
mysql Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (x86_64) using readline 5.2
Just looking for an idea of where to begin troubleshooting this… Is the problem with the database or the php function? The logs don’t seem to give any additional clues. Ideas?
FreePBX Report Fix:
To fix the error of reports not showing up with an error of “Fatal error: Call to undefined method DB_Error::numRows() in /var/www/admin/cdr/call-log.php on line 295″
1. login root or type sudo su
2. Make a directory for backups (always a good idea)# mkdir /db_backup/
3. Dump your DB to a backup file# mysqldump -u root -p asteriskcdrdb > /db_backup/asteriskcdrdb.sql
4. Re-install cdrdb using this command# mysql asteriskcdrdb < /usr/src/freepbx-2.5.0/SQL/cdr_mysql_table.sql -u root -p
Call log reports should be fine now.
hi komotchoffo
how did u overcome the “Unrecognized character \xE2 at -e line 1″
i’ve uncountered the same error. I really need help to move on
@arun sabarish
i have issued the “sudo gedit /etc/apache2/sitesenabled/000-default”
but what should be edited in file? in this area “edit DocumentRoot /var/www/asterisk/
and Directory /var/www/asterisk/ ” you specified, i rather have DocumentRoot /var/www/ and Directory /var/www/.
Does this mean i did something wrong? Please help.
hi kwabena ..
give this command.
#sudo gedit /etc/apache2/sites-enabled/000-default
and you will be having like
DocumentRoot /var/www/ and Directory /var/www/.
now add asterisk at the end of www/ of the both DocumentRoot and Directory .after adding asterisk you will be having like this.
DocumentRoot /var/www/asterisk/
Directory /var/www/asterisk/
Thanking u! for any help mail me at arunsabarish@in.com
and i have Asterisk and FreePBX Installation Documentation
exelent guide all work fine inclusive with codec negotiation patch.
run fine 101%
I installed it all but root http shows :
Welcome
Voicemail & Recordings (ARI)
Flash Operator Panel (FOP)
FreePBX Administration
When I click any of them I get :
Forbidden
You don’t have permission to access /admin/ on this server.
Now I am stuck
Thank you very much!
I tried many other ways but no luck.
This one worked perfectly on the first attempt.
It is an excellent howto-
I used it on Ubuntu x86_64 server-
Was wondering if anyone has had luck upgrading to Ubuntu 9.04 after following this procedure.
I’ll let you know i am about to upgrade our main box at work to jaunty. I’ll keep you posted.
I have made a clean install of Ubuntu 9.04 and followed these procedures and everything works. Except the call logs dont work.
Thanks everybody !
I set up successfuly with ubuntu 8.10
Can you help me create and config trunk with SIP.
Thanks any help !
Thanks for the article. Was able to properly configure FreePBX in Xubuntu jaunty + dahdi (instead of zaptel) + an old x100p.
Maybe you need to edit:
Configure Apache for FreePBX
# sudo nano /etc/apache2/envvars
instead of
# sudo nano /etc/apache/envvars
Cheers!
Hello, i follow this guide, and works, except for this message in Freepbx panel :
Warning: parse_ini_file(/var/www/html/panel/op_server.cfg) [function.parse-ini-file]: failed to open stream: Permission denied in /var/www/admin/modules/dashboard/class.procinfo.php on line 21
How could fix this ??
thanks
Hello, i follow your guide : http://colt45.chemlab.org/?p=55, but now i cant conect my sip phone.
I have ebox 1.4 in a vmware machine, i have the problem wath freez machine when call hang up.
Then i found your guide.
Could you help me please ??, i new in this area.
this is /etc/asterisk/full :
NOTICE[11822] chan_sip.c: Registration from ‘”1000″‘ failed for ’192.168.0.17′ – No matching peer found
thanks
Hi, this works fine on ubuntu 9.10 too
Only snag is it stops PhpMyAdmin working as it changes the user which apache runs as. Guess I could always try to install PMA under lighttpd..
I am sure that i will come back to your blog soon. Keep us posting