Difference between revisions of "VoIP: Instalasi FreePBX untuk Asterisk"

From OnnoWiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 45: Line 45:
  
 
==Install FreePBX==
 
==Install FreePBX==
 +
 +
groupadd asterisk
 +
useradd -c "asterisk PBX" -d /var/lib/asterisk -g asterisk asterisk
 +
  
 
  cp freepbx-2.8.0.tar.gz /usr/local/src/
 
  cp freepbx-2.8.0.tar.gz /usr/local/src/
Line 55: Line 59:
 
  /etc/init.d/mysqld start
 
  /etc/init.d/mysqld start
 
  mysqladmin --user=root --password=123456 create asteriskcdrdb
 
  mysqladmin --user=root --password=123456 create asteriskcdrdb
  mysql --user=root --password=123456 asteriskcdrdb < /usr/local/src/freepbx-2.6.0RC2/SQL/cdr_mysql_table.sql
+
  mysql --user=root --password=123456 asteriskcdrdb < /usr/local/src/freepbx-2.8.0/SQL/cdr_mysql_table.sql
 
  mysqladmin --user=root --password=123456 create asterisk
 
  mysqladmin --user=root --password=123456 create asterisk
  mysql --user=root --password=123456 asterisk < /usr/local/src/freepbx-2.6.0RC2/SQL/newinstall.sql
+
  mysql --user=root --password=123456 asterisk < /usr/local/src/freepbx-2.8.0/SQL/newinstall.sql
  
 
  mysql --user root --password=123456
 
  mysql --user root --password=123456
Line 64: Line 68:
 
  quit
 
  quit
  
  cd /usr/local/src/freepbx-2.6.0RC2
+
groupadd asterisk
  sudo ./install_amp
+
useradd -c "asterisk PBX" -d /var/lib/asterisk -g asterisk asterisk
 +
chown -Rf asterisk.asterisk /usr/local/src/freepbx-2.8.0
 +
 
 +
  cd /usr/local/src/freepbx-2.8.0
 +
  sudo ./install_amp --username=root --password=123456
  
 
  Creating new /etc/amportal.conf
 
  Creating new /etc/amportal.conf

Latest revision as of 12:28, 8 December 2010

Download source code

http://mirror.freepbx.org/freepbx-2.6.0RC2.tar.gz
apt-get install subversion
mkdir /var/www/freepbx
svn co http://www.freepbx.org/v3/svn/trunk/ /var/www/freepbx/


Instal Software Pendukung

apt-get install asterisk asterisk-dev asterisk-config asterisk-sounds-main \
asterisk-sounds-extra dahdi gastman asterisk-mysql\
apt-get install php5-mysql php-db mysql-server libapache2-mod-php5 php5-gd \
php-pear sox curl php5-curl apache2 libxml2 libxml2-dev libtiff4-dev lame \
mysql-client libmysqlclient16-dev openssl libssl-dev
sudo a2enmod php5

Edit /etc/php5/apache2/php.ini

vi /etc/php5/apache2/php.ini

Modifikasi supaya

; PHP's built-in default is text/html
default_mimetype = "text/html"
;default_charset = "ISO-8859-1"
default_charset = "utf8";
upload_max_filesize = 5M
max_execution_time = 60
max_input_time = 120
memory_limit = 32M

Setup database

# mysql --user root --password=123456
create database freepbx;
grant INSERT,SELECT on root.* to freepbx@localhost;
grant ALL on freepbx.* to freepbx@localhost identified by 'freepbx';
grant ALL on freepbx.* to freepbx identified by 'freepbx';
exit

Install FreePBX

groupadd asterisk
useradd -c "asterisk PBX" -d /var/lib/asterisk -g asterisk asterisk


cp freepbx-2.8.0.tar.gz /usr/local/src/
cd /usr/local/src
tar zxvf freepbx-2.8.0.tar.gz 
/usr/bin/mysqladmin -u root password '123456'
/usr/bin/mysqladmin -u root -h server password '123456'
/usr/bin/mysql_install_db
/etc/init.d/mysqld start
mysqladmin --user=root --password=123456 create asteriskcdrdb
mysql --user=root --password=123456 asteriskcdrdb < /usr/local/src/freepbx-2.8.0/SQL/cdr_mysql_table.sql
mysqladmin --user=root --password=123456 create asterisk
mysql --user=root --password=123456 asterisk < /usr/local/src/freepbx-2.8.0/SQL/newinstall.sql
mysql --user root --password=123456
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY 'amp109';
GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY 'amp109';
quit
groupadd asterisk
useradd -c "asterisk PBX" -d /var/lib/asterisk -g asterisk asterisk
chown -Rf asterisk.asterisk /usr/local/src/freepbx-2.8.0
cd /usr/local/src/freepbx-2.8.0
sudo ./install_amp --username=root --password=123456
Creating new /etc/amportal.conf
Enter your USERNAME to connect to the 'asterisk' database:
 [asteriskuser] 
Enter your PASSWORD to connect to the 'asterisk' database:
 [amp109] 
Enter the hostname of the 'asterisk' database:
 [localhost] 
Enter a USERNAME to connect to the Asterisk Manager interface:
 [admin] 
Enter a PASSWORD to connect to the Asterisk Manager interface:
 [amp111] 
Enter the path to use for your AMP web root:
 [/var/www/html] 
/var/www/freepbx
Enter the IP ADDRESS or hostname used to access the AMP web-admin:
 [xx.xx.xx.xx] 127.0.0.1
Enter a PASSWORD to perform call transfers with the Flash Operator Panel:
 [passw0rd] 
Use simple Extensions [extensions] admin or separate Devices and Users [deviceanduser]?
 [extensions] 
Enter directory in which to store AMP executable scripts:
 [/var/lib/asterisk/bin] 
Created /var/lib/asterisk/bin
Enter directory in which to store super-user scripts:
 [/usr/local/sbin]

Jika ingin di edit di kemudian hari

vi /etc/amportal.conf

Pastikan:

AMPDBHOST=localhost
AMPDBUSER=asteriskuser
AMPDBENGINE=mysql
AMPDBPASS=amp109
AMPENGINE=asterisk
AMPMGRUSER=admin
AMPMGRPASS=amp111
AMPBIN=/var/lib/asterisk/bin
AMPSBIN=/usr/local/sbin
AMPWEBROOT=/var/www/freepbx
AMPCGIBIN=/var/www/cgi-bin
AMPWEBADDRESS=127.0.0.1
FOPWEBROOT=/var/www/freepbx/panel
FOPPASSWORD=passw0rd
FOPSORT=extension

Pastikan FreePBX bisa mengakses Asterisk

sudo adduser www-data asterisk
sudo apache2ctl graceful

Akses Web

http://localhost/freepbx/
Freepbx-asterisk-01.jpeg
Freepbx-asterisk-02.jpeg
Freepbx-asterisk-03.jpeg

Referensi

Pranala Menarik