Difference between revisions of "Compile OpenSIPS"

From OnnoWiki
Jump to navigation Jump to search
 
(62 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Siapkan Software Pendukung==
 
==Siapkan Software Pendukung==
  
Untuk [[Ubuntu]] 9.10 dapat menggunakan perintah berikut
+
Untuk [[Ubuntu]] 14.04 dapat menggunakan perintah berikut
  
  # apt-get install flex bison gcc make libperl5.10 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
+
  apt-get install flex bison gcc make libperl5.18 libperl-dev libxmlrpc-core-c3 libxmlrpc-core-c3-dev \
 +
unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
 +
libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libconfuse0 libconfuse-dev \
 +
libmysqlclient-dev mysql-client-5.5 mysql-server zlib1g zlib1g-dev  libmysql++3 libmysql++-dev libpcre3 \
 +
libpcre3-dbg libpcre3-dev libsnmp30 libsnmp-base libncurses5-dev libxml2-dev libsctp-dev libssl-dev
 +
 
 +
Untuk [[Ubuntu]] 13.04 dapat menggunakan perintah berikut
 +
 
 +
apt-get install flex bison gcc make libperl5.14 libperl-dev libxmlrpc-core-c3 libxmlrpc-c3-dev \
 
  unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
 
  unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
 
  libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libsnmp15 libsnmp-dev libconfuse0 libconfuse-dev \
 
  libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libsnmp15 libsnmp-dev libconfuse0 libconfuse-dev \
  libmysqlclient15off libmysqlclient15-dev mysql-client-5.1 mysql-server zlib1g zlib1g-dev \
+
  libmysqlclient-dev mysql-client-5.5 mysql-server zlib1g zlib1g-dev  libmysql++3 libmysql++-dev libpcre3 \
  libmysql++3 libmysql++-dev
+
libpcre3-dbg libpcre3-dev ncurses-dev
 +
 
 +
Untuk [[Ubuntu]] 10.10 dapat menggunakan perintah berikut
 +
 
 +
apt-get install flex bison gcc make libperl5.10 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
 +
unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
 +
libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libsnmp15 libsnmp-dev libconfuse0 libconfuse-dev \
 +
libmysqlclient-dev mysql-client-5.1 mysql-server zlib1g zlib1g-dev \
 +
  libmysql++3 libmysql++-dev libpcre3 libpcre3-dbg libpcre3-dev
 +
 
 +
Untuk [[Ubuntu]] 9.10, 10.04 dapat menggunakan perintah berikut
 +
 
 +
apt-get install flex bison gcc make libperl5.10 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
 +
unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
 +
libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libsnmp15 libsnmp-dev libconfuse0 libconfuse-dev \
 +
libmysqlclient16 libmysqlclient-dev mysql-client-5.1 mysql-server zlib1g zlib1g-dev \
 +
libmysql++3 libmysql++-dev libpcre3 libpcre3-dbg libpcre3-dev
  
  
 
Untuk [[Ubuntu]] 8.10 & 9.04 dapat menggunakan perintah berikut
 
Untuk [[Ubuntu]] 8.10 & 9.04 dapat menggunakan perintah berikut
  
  # apt-get install flex bison gcc make libperl5.10 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
+
  apt-get install flex bison gcc make libperl5.10 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
 
  unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
 
  unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
 
  libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libsnmp15 libsnmp-dev libconfuse0 libconfuse-dev \
 
  libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libsnmp15 libsnmp-dev libconfuse0 libconfuse-dev \
Line 21: Line 45:
 
Untuk [[Ubuntu]] 8.04 dapat menggunakan perintah berikut
 
Untuk [[Ubuntu]] 8.04 dapat menggunakan perintah berikut
  
  # apt-get install flex bison gcc make libperl5.8 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
+
  apt-get install flex bison gcc make libperl5.8 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
 
  unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
 
  unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
 
  libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libsnmp15 libsnmp-dev libconfuse0 libconfuse-dev \
 
  libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libsnmp15 libsnmp-dev libconfuse0 libconfuse-dev \
 
  libmysqlclient15off libmysqlclient15-dev mysql-client-5.0 mysql-server zlib1g zlib1g-dev
 
  libmysqlclient15off libmysqlclient15-dev mysql-client-5.0 mysql-server zlib1g zlib1g-dev
 
  
 
Untuk [[Ubuntu]] 7.10 dapat menggunakan perintah berikut
 
Untuk [[Ubuntu]] 7.10 dapat menggunakan perintah berikut
  
  # apt-get install flex bison gcc make libperl5.8 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
+
  apt-get install flex bison gcc make libperl5.8 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
 
  unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
 
  unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
 
  libexpat1 libexpat1-dev libldap2 libldap2-dev libsnmp10 libsnmp-dev libconfuse0 libconfuse-dev \
 
  libexpat1 libexpat1-dev libldap2 libldap2-dev libsnmp10 libsnmp-dev libconfuse0 libconfuse-dev \
Line 37: Line 60:
 
Jika kita ingin menggunakan [[PostgresQL]], kita perlu menginstalasi [[PostgresQL]] melalui perintah
 
Jika kita ingin menggunakan [[PostgresQL]], kita perlu menginstalasi [[PostgresQL]] melalui perintah
  
  # apt-get install libpq5 libpq-dev
+
  apt-get install libpq5 libpq-dev
  
 
==Ambil dan Buka [[Source Code]] OpenSIPS==
 
==Ambil dan Buka [[Source Code]] OpenSIPS==
Line 46: Line 69:
 
  http://www.opensips.org/index.php?n=Resources.Downloads#osippub
 
  http://www.opensips.org/index.php?n=Resources.Downloads#osippub
 
  http://www.opensips.org/index.php?n=Resources.Downloads#osipsf
 
  http://www.opensips.org/index.php?n=Resources.Downloads#osipsf
 +
http://opensips.org/pub/opensips/1.10.0/src/
 +
http://opensips.org/pub/opensips/latest/
  
 +
cd /usr/local/src/
 +
wget http://opensips.org/pub/opensips/latest/opensips-2.2.2.tar.gz
 +
 +
Jika anda menggunakan versi 2.2.2, lakukan
  
Jika anda tidak menggunakan TLS, lakukan
 
  
sudo su -
 
cp opensips-1.6.0-notls_src.tar.gz /usr/local/src/
 
 
  cd /usr/local/src/
 
  cd /usr/local/src/
  tar zxvf opensips-1.6.0-notls_src.tar.gz  
+
  tar zxvf opensips-2.2.2.tar.gz  
  cd opensips-1.6.0-notls
+
  cd /usr/local/src/opensips-2.2.2
 +
 
 +
==menuconfig==
 +
 
 +
Lakukan
  
 +
cd /usr/local/src/opensips-2.2.2
 +
make menuconfig
  
Jika anda menggunakan TLS, lakukan
+
Pilih
  
  sudo su -
+
  Configure Compile Options
  cp opensips-1.6.0-tls_src.tar.gz /usr/local/src/
+
  Configure Excluded Modules
  cd /usr/local/src/
+
    [*] pi_http
  tar zxvf opensips-1.6.0-tls_src.tar.gz
+
    [*] proto_sctp
  cd opensips-1.6.0-tls
+
    [*] proto_tls
 +
  Save Changes
 +
 +
  Generate OpenSIPS Script
 +
  Residential Script
 +
    Configure Residential Script
 +
      [*] ENABLE_TCP
 +
      [*] ENABLE_TLS
 +
      [*] USE_NAT
 +
      [*] USE_HTTP_MANAGEMENT_INTERFACE
 +
    Save Residential Script
 +
    Generate Residential Script
 +
   
 +
  Compile And Install OpenSIPS
 +
  Exit & Save All Changes
  
 
==Compile==
 
==Compile==
 +
 +
Sebaiknya [[compile]] dan install sekaligus dengan modul "acc", "mysql", "textops", "sl", "db_mysql" dan "enum" melalui perintah
 +
 +
'''make clean && make all && make include_modules="acc mysql textops sl enum db_mysql tls" modules && make install'''
 +
 +
Copykan scripts
 +
 +
mkdir -p /usr/local/lib/opensips/opensipsctl/
 +
cp -Rf /usr/local/src/opensips-2.2.2/scripts/* /usr/local/lib/opensips/opensipsctl/
 +
 +
===Cara yang lebih konservatif===
  
 
[[Compile]] menggunakan perintah
 
[[Compile]] menggunakan perintah
Line 71: Line 128:
 
  make
 
  make
 
  make modules
 
  make modules
 +
 +
Copykan scripts
 +
 +
mkdir -p /usr/local/lib/opensips/opensipsctl/
 +
cp -Rf /usr/local/src/opensips-2.2.2/scripts/* /usr/local/lib/opensips/opensipsctl/
 +
 +
atau
 +
 
  make install
 
  make install
  
Line 85: Line 150:
 
  make prefix=/usr/ install
 
  make prefix=/usr/ install
  
Jika anda ingin agar modul "acc", "mysql", "textops", "sl", "db_mysql" dan "enum" di compile lakukan
+
==Konfigurasi Dasar OpenSIPS==
  
make all && make include_modules="acc mysql textops sl enum db_mysql" modules && make install
 
  
Copykan scripts ke /usr/local/src/opensips/opensipsctl
+
Semua file konfigurasi openser hasil compile terdapat di
  
  cp -Rf /usr/local/src/opensips-1.6.0-tls/scripts/* /usr/local/lib/opensips/opensipsctl
+
  /usr/local/etc/opensips
  
atau
+
Pastikan
 
 
cp -Rf /usr/local/src/opensips-1.6.0-notls/scripts/* /usr/local/lib/opensips/opensipsctl
 
 
 
Kadang kala tidak ada path ke arah binary openser di /usr/local/sbin.
 
Agar bisa di run dari /usr/sbin/, copy opensips* di /usr/local/sbin ke /usr/sbin
 
  
  cp /usr/local/sbin/opensips* /usr/sbin
+
  vi /usr/local/etc/opensips/opensips.cfg
cp -Rf /usr/local/lib/opensips/ /usr/lib/
 
  
Kalau anda menginginkan dapat juga mengcopy
+
Set dengan IP server
  
  cp -Rf /usr/local/etc/opensips /etc
+
  listen=udp:127.0.0.1:5060  # CUSTOMIZE ME
 
 
==Konfigurasi Dasar OpenSIPS==
 
  
 +
Lakukan [[OpenSIPS: Cek Konfigurasi | cek konfigurasi]] ada kesalahan dalam konfigurasi file
  
Semua file konfigurasi openser hasil compile terdapat di
+
opensips -c -f /usr/local/etc/opensips/opensips.cfg
  
/usr/local/etc/opensips
+
==Beberapa Bug di versi < 1.6.2==
  
 +
===file /tmp/opensips_fifo===
  
 
Edit /usr/local/etc/opensips/opensips.cfg
 
Edit /usr/local/etc/opensips/opensips.cfg
  
  # vi /usr/local/etc/opensips/opensips.cfg
+
  vi /usr/local/etc/opensips/opensips.cfg
  
 
Pastikan
 
Pastikan
  
 
  modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
 
  modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
 
  
 
Lakukan
 
Lakukan
  
  # touch /tmp/opensips_fifo
+
  rm -Rf /tmp/opensips_fifo
 
+
  touch /tmp/opensips_fifo
 
 
Cek apakah ada kesalahan dalam konfigurasi file
 
 
 
  # opensips -c -f /usr/local/etc/opensips/opensips.cfg
 
 
 
  
 
+
===scripts untuk opensipsctl===
==Beberapa Bug==
 
  
 
Kadang kala ada bug dalam proses instalasi, entah kenapa tidak semua module tercopy ke folder yang benar.  
 
Kadang kala ada bug dalam proses instalasi, entah kenapa tidak semua module tercopy ke folder yang benar.  
Line 141: Line 192:
 
Copykan scripts ke /usr/local/lib/opensips/opensipsctl
 
Copykan scripts ke /usr/local/lib/opensips/opensipsctl
  
  cp -Rf /usr/local/src/opensips-1.6.0-notls/scripts/* /usr/local/lib/opensips/opensipsctl
+
  cp -Rf /usr/local/src/opensips-1.6.4-2-notls/scripts/* /usr/local/lib/opensips/opensipsctl
  
 
atau
 
atau
  
  cp -Rf /usr/local/src/opensips-1.6.0-tls/scripts/* /usr/local/lib/opensips/opensipsctl
+
  cp -Rf /usr/local/src/opensips-1.6.4-2-tls/scripts/* /usr/local/lib/opensips/opensipsctl
 
 
  
 +
===copy modul .so ke folder lib64/modules===
  
Kita kadang kala perlu mengcopy secara manual
+
Cek terlebih dulu
  
  cp /usr/local/src/opensips-1.6.0-notls/modules/mysql/mysql.so /usr/lib/openser/modules/
+
  ls /usr/local/lib64/opensips/modules
cp /usr/local/src/opensips-1.6.0-notls/modules/sl/sl.so /usr/lib/openser/modules/
 
cp /usr/local/src/opensips-1.6.0-notls/modules/textops/textops.so /usr/lib/openser/modules/
 
cp /usr/local/src/opensips-1.6.0-notls/modules/enum/enum.so /usr/lib/openser/modules/
 
  
 
Atau jika anda mengcompile di /usr/local/src kemungkinan path yang dibutuhkan adalah
 
Atau jika anda mengcompile di /usr/local/src kemungkinan path yang dibutuhkan adalah
  
  cp /usr/local/src/opensips-1.6.0-tls/modules/mysql/mysql.so /usr/local/lib/openser/modules/
+
  cp /usr/local/src/opensips-1.10.0-tls/modules/db_mysql/db_mysql.so /usr/local/lib64/opensips/modules
  cp /usr/local/src/opensips-1.6.0-tls/modules/sl/sl.so /usr/local/lib/openser/modules/
+
  cp /usr/local/src/opensips-1.10.0-tls/modules/sl/sl.so /usr/local/lib64/opensips/modules
  cp /usr/local/src/opensips-1.6.0-tls/modules/textops/textops.so /usr/local/lib/openser/modules/
+
  cp /usr/local/src/opensips-1.10.0-tls/modules/textops/textops.so /usr/local/lib64/opensips/modules
  cp /usr/local/src/opensips-1.6.0-tls/modules/enum/enum.so /usr/local/lib/openser/modules/
+
  cp /usr/local/src/opensips-1.10.0-tls/modules/enum/enum.so /usr/local/lib64/opensips/modules
 +
cp /usr/local/src/opensips-1.10.0-tls/modules/sl/sl.so /usr/local/lib64/opensips/modules
  
 
==Pranala Menarik==
 
==Pranala Menarik==
  
 +
* [[OpenSIPS]]
 
* [[OpenSIPS Softswitch]]
 
* [[OpenSIPS Softswitch]]
 +
* [[Compile OpenSIPS]]
 +
* [[OpenSIPS: Cek Konfigurasi]]
 +
* [[OpenSIPS: Demo Dial Plan]]
 
* [[Menggunakan opensipsdbctl]]
 
* [[Menggunakan opensipsdbctl]]
 
* [[Menggunakan opensipsctl]]
 
* [[Menggunakan opensipsctl]]
* [[Konfigurasi Minimal OpenSIPS]]
+
* [[Konfigurasi minimal OpenSIPS]]
 +
* [[OpenSIPS: Demo User]]
 +
* [[Relay ke PSTN Menggunakan OpenSIPS]]
 +
* [[Relay ke Selular Menggunakan OpenSIPS]]
 +
* [[OpenSIPS: Rewrite URI]]
 
* [[ENUM Query di OpenSIPS]]
 
* [[ENUM Query di OpenSIPS]]
* [[Linux Howto]]
+
* [[OpenSIPS: Menjalankan Softswitch]]
* [[VoIP]]
 

Latest revision as of 10:50, 21 October 2016

Siapkan Software Pendukung

Untuk Ubuntu 14.04 dapat menggunakan perintah berikut

apt-get install flex bison gcc make libperl5.18 libperl-dev libxmlrpc-core-c3 libxmlrpc-core-c3-dev \
unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libconfuse0 libconfuse-dev \
libmysqlclient-dev mysql-client-5.5 mysql-server zlib1g zlib1g-dev  libmysql++3 libmysql++-dev libpcre3 \
libpcre3-dbg libpcre3-dev libsnmp30 libsnmp-base libncurses5-dev libxml2-dev libsctp-dev libssl-dev

Untuk Ubuntu 13.04 dapat menggunakan perintah berikut

apt-get install flex bison gcc make libperl5.14 libperl-dev libxmlrpc-core-c3 libxmlrpc-c3-dev \
unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libsnmp15 libsnmp-dev libconfuse0 libconfuse-dev \
libmysqlclient-dev mysql-client-5.5 mysql-server zlib1g zlib1g-dev  libmysql++3 libmysql++-dev libpcre3 \
libpcre3-dbg libpcre3-dev ncurses-dev

Untuk Ubuntu 10.10 dapat menggunakan perintah berikut

apt-get install flex bison gcc make libperl5.10 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libsnmp15 libsnmp-dev libconfuse0 libconfuse-dev \
libmysqlclient-dev mysql-client-5.1 mysql-server zlib1g zlib1g-dev \
libmysql++3 libmysql++-dev libpcre3 libpcre3-dbg libpcre3-dev

Untuk Ubuntu 9.10, 10.04 dapat menggunakan perintah berikut

apt-get install flex bison gcc make libperl5.10 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libsnmp15 libsnmp-dev libconfuse0 libconfuse-dev \
libmysqlclient16 libmysqlclient-dev mysql-client-5.1 mysql-server zlib1g zlib1g-dev \
libmysql++3 libmysql++-dev libpcre3 libpcre3-dbg libpcre3-dev


Untuk Ubuntu 8.10 & 9.04 dapat menggunakan perintah berikut

apt-get install flex bison gcc make libperl5.10 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libsnmp15 libsnmp-dev libconfuse0 libconfuse-dev \
libmysqlclient15off libmysqlclient15-dev mysql-client-5.0 mysql-server zlib1g zlib1g-dev \
libmysql++3 libmysql++-dev

Untuk Ubuntu 8.04 dapat menggunakan perintah berikut

apt-get install flex bison gcc make libperl5.8 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libsnmp15 libsnmp-dev libconfuse0 libconfuse-dev \
libmysqlclient15off libmysqlclient15-dev mysql-client-5.0 mysql-server zlib1g zlib1g-dev

Untuk Ubuntu 7.10 dapat menggunakan perintah berikut

apt-get install flex bison gcc make libperl5.8 libperl-dev libxmlrpc-c3 libxmlrpc-c3-dev \
unixodbc unixodbc-dev libradiusclient-ng2 libradiusclient-ng-dev libxml2 openssl libsctp1 libsctp-dev \
libexpat1 libexpat1-dev libldap2 libldap2-dev libsnmp10 libsnmp-dev libconfuse0 libconfuse-dev \
libmysqlclient15off libmysqlclient15-dev mysql-client-5.0 mysql-server zlib1g zlib1g-dev


Jika kita ingin menggunakan PostgresQL, kita perlu menginstalasi PostgresQL melalui perintah

apt-get install libpq5 libpq-dev

Ambil dan Buka Source Code OpenSIPS

Ambil source code dari

http://opensips.org/pub/opensips/
http://www.opensips.org/index.php?n=Resources.Downloads#osippub
http://www.opensips.org/index.php?n=Resources.Downloads#osipsf
http://opensips.org/pub/opensips/1.10.0/src/
http://opensips.org/pub/opensips/latest/
cd /usr/local/src/
wget http://opensips.org/pub/opensips/latest/opensips-2.2.2.tar.gz

Jika anda menggunakan versi 2.2.2, lakukan


cd /usr/local/src/
tar zxvf opensips-2.2.2.tar.gz   
cd /usr/local/src/opensips-2.2.2

menuconfig

Lakukan

cd /usr/local/src/opensips-2.2.2
make menuconfig

Pilih

Configure Compile Options 
  Configure Excluded Modules 
    [*] pi_http
    [*] proto_sctp
    [*] proto_tls
  Save Changes

Generate OpenSIPS Script
  Residential Script
    Configure Residential Script 
      [*] ENABLE_TCP
      [*] ENABLE_TLS
      [*] USE_NAT
      [*] USE_HTTP_MANAGEMENT_INTERFACE
    Save Residential Script
    Generate Residential Script

Compile And Install OpenSIPS 
Exit & Save All Changes

Compile

Sebaiknya compile dan install sekaligus dengan modul "acc", "mysql", "textops", "sl", "db_mysql" dan "enum" melalui perintah

make clean && make all && make include_modules="acc mysql textops sl enum db_mysql tls" modules && make install

Copykan scripts

mkdir -p /usr/local/lib/opensips/opensipsctl/
cp -Rf /usr/local/src/opensips-2.2.2/scripts/* /usr/local/lib/opensips/opensipsctl/

Cara yang lebih konservatif

Compile menggunakan perintah

make
make modules

Copykan scripts

mkdir -p /usr/local/lib/opensips/opensipsctl/
cp -Rf /usr/local/src/opensips-2.2.2/scripts/* /usr/local/lib/opensips/opensipsctl/

atau

make install

Atau

make && make modules && make install

Atau

make all && make install

Jika anda ingin menginstalasi OpenSIPS di folder /usr/sbin, maka sebaiknya kita install menggunakan perintah

make prefix=/usr/ install

Konfigurasi Dasar OpenSIPS

Semua file konfigurasi openser hasil compile terdapat di

/usr/local/etc/opensips

Pastikan

vi /usr/local/etc/opensips/opensips.cfg

Set dengan IP server

listen=udp:127.0.0.1:5060   # CUSTOMIZE ME

Lakukan cek konfigurasi ada kesalahan dalam konfigurasi file

opensips -c -f /usr/local/etc/opensips/opensips.cfg

Beberapa Bug di versi < 1.6.2

file /tmp/opensips_fifo

Edit /usr/local/etc/opensips/opensips.cfg

vi /usr/local/etc/opensips/opensips.cfg

Pastikan

modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")

Lakukan

rm -Rf /tmp/opensips_fifo
touch /tmp/opensips_fifo

scripts untuk opensipsctl

Kadang kala ada bug dalam proses instalasi, entah kenapa tidak semua module tercopy ke folder yang benar.

Copykan scripts ke /usr/local/lib/opensips/opensipsctl

cp -Rf /usr/local/src/opensips-1.6.4-2-notls/scripts/* /usr/local/lib/opensips/opensipsctl

atau

cp -Rf /usr/local/src/opensips-1.6.4-2-tls/scripts/* /usr/local/lib/opensips/opensipsctl

copy modul .so ke folder lib64/modules

Cek terlebih dulu

ls /usr/local/lib64/opensips/modules

Atau jika anda mengcompile di /usr/local/src kemungkinan path yang dibutuhkan adalah

cp /usr/local/src/opensips-1.10.0-tls/modules/db_mysql/db_mysql.so /usr/local/lib64/opensips/modules
cp /usr/local/src/opensips-1.10.0-tls/modules/sl/sl.so /usr/local/lib64/opensips/modules
cp /usr/local/src/opensips-1.10.0-tls/modules/textops/textops.so /usr/local/lib64/opensips/modules
cp /usr/local/src/opensips-1.10.0-tls/modules/enum/enum.so /usr/local/lib64/opensips/modules
cp /usr/local/src/opensips-1.10.0-tls/modules/sl/sl.so /usr/local/lib64/opensips/modules

Pranala Menarik