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

From OnnoWiki
Jump to navigation Jump to search
(New page: Instal Software Pendukung sudo apt-get install asterisk asterisk-mysql php5-mysql php-db mysql-server \ libapache2-mod-php5 php5-gd php-pear php-pear-DB sox curl sudo a2enmod php5 Ed...)
 
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
Instal Software Pendukung
+
==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 apt-get install asterisk asterisk-mysql php5-mysql php-db mysql-server \
 
libapache2-mod-php5 php5-gd php-pear php-pear-DB sox curl
 
 
  sudo a2enmod php5
 
  sudo a2enmod php5
  
Line 16: Line 30:
 
  default_charset = "utf8";
 
  default_charset = "utf8";
  
Install FreePBX
+
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/src/freepbx
+
  cd /usr/local/src/freepbx-2.8.0
  sudo ./install_amp
+
  sudo ./install_amp --username=root --password=123456
  
Perubahan agar FreePBX bisa bekerja dengan [[Asterisk]] di [[Ubuntu]]
+
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
 
  AMPBIN=/var/lib/asterisk/bin
  ASTAGIDIR=/usr/share/asterisk/agi-bin
+
  AMPSBIN=/usr/local/sbin
 
  AMPWEBROOT=/var/www/freepbx
 
  AMPWEBROOT=/var/www/freepbx
 +
AMPCGIBIN=/var/www/cgi-bin
 +
AMPWEBADDRESS=127.0.0.1
 
  FOPWEBROOT=/var/www/freepbx/panel
 
  FOPWEBROOT=/var/www/freepbx/panel
 +
FOPPASSWORD=passw0rd
 +
FOPSORT=extension
  
 
Pastikan FreePBX bisa mengakses Asterisk
 
Pastikan FreePBX bisa mengakses Asterisk
Line 33: Line 128:
 
  sudo apache2ctl graceful
 
  sudo apache2ctl graceful
  
 +
==Akses Web==
 +
 +
http://localhost/freepbx/
 +
 +
[[Image:Freepbx-asterisk-01.jpeg|center|200px|thumb]]
 +
 +
[[Image:Freepbx-asterisk-02.jpeg|center|200px|thumb]]
 +
 +
[[Image:Freepbx-asterisk-03.jpeg|center|200px|thumb]]
  
 
==Referensi==
 
==Referensi==

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