OpenSIPS: Instalasi Minimal di Ubuntu 16.04

From OnnoWiki
Jump to navigation Jump to search

Sumber: https://www.opensips.org/Documentation/Install


Siapkan aplikasi pendukung

apt-get install flex bison gcc make perl libperl-dev libxmlrpc-core-c3 libxmlrpc-core-c3-dev \
unixodbc unixodbc-dev libfreeradius2 libfreeradius-client-dev libxml2 openssl libsctp1 libsctp-dev \
libexpat1 libexpat1-dev libldap-2.4-2 libldap2-dev libsnmp30 libsnmp-base libsnmp-dev libconfuse0 libconfuse-dev \
libmysqlclient-dev mysql-client mysql-server zlib1g zlib1g-dev  libmysql++ libmysql++-dev libpcre3 \
libpcre3-dbg libpcre3-dev libncurses5-dev libmysqlclient-dev libsctp-dev libssl-dev
apt-get install perl libdbi-perl libdbd-mysql-perl libdbd-pg-perl libfrontier-rpc-perl libterm-readline-gnu-perl libberkeleydb-perl


Optional untuk DBD::Oracle

Download the .tar.gz archive from: http://search.cpan.org/~pythian/DBD-Oracle-1.22/Oracle.pm	
Decompress and unpack it
cd DBD-Oracle-1.22
perl Makefile.PL
make
make test
make install 


Download Source Code

cd /usr/local/src
wget http://opensips.org/pub/opensips/latest/opensips-2.2.2.tar.gz
tar zxvf opensips-2.2.2.tar.gz 
cd /usr/local/src/opensips-2.2.2

Compile

 make menuconfig

pilih

Configure Compile Options
  Configure Excluded Modules
     [*] pi_http
     [*] proto_sctp
     [*] proto_tls
     [*] proto_wss
     [*] presence
     [*] presence_dialoginfo
     [*] presence_mwi
     [*] presence_xml  
  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

Copy scripts

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

untuk 64bit

cp -Rf /usr/local/src/opensips-2.2.2/scripts/* /usr/local/lib64/opensips/opensipsctl/

Cek Configurasi

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

Restart

opensipsctl restart

Monitor

opensipsctl monitor

akan keluar


[cycle #: 8; if constant make sure server lives]
Server:: OpenSIPS (2.2.2 (i386/linux))
Now:: Fri Oct 21 07:06:24 2016
Up since:: Fri Oct 21 07:05:28 2016
Up time:: 56 [sec]

Transaction Statistics: 
tm:UAS_transactions:: 0
tm:UAC_transactions:: 0
tm:inuse_transactions:: 0

Stateless Server Statistics: 
sl:sent_replies:: 0
sl:sent_err_replies:: 0
sl:received_ACKs:: 0 

UsrLoc Stats: 
usrloc:registered_users:: 0
usrloc:location-users:: 0
usrloc:location-contacts:: 0
usrloc:location-expires:: 0

Referensi