is a SIP server, I don't think I can explain this all myself so copying from the project's main page
Now moving onwards with steps to install the SIP server.
First update the repository and package indexes to install the latest available pakcages.
Download and extract opensips source tarball
root@OSIPS_SBC# wget http://opensips.org/pub/opensips/1.7.2/src/opensips-1.7.2_src.tar.gz
root@OSIPS_SBC# tar zxvf opensips-1.7.2_src.tar.gz
root@OSIPS_SBC# cd opensips-1.7.2-tls/
UPDATE: The newer OpenSIPS version (1.8 onwards) don't need to edit Makefile and select the packages like below. Visit the lastes blog-post on
OpenSIPS+Cassandra Integration to see how that works. (
Hint: make menuconfig)
Edit "Makefile" to include your required modules.
root@Osips-SBC# vim Makefile
Uncomment the following lines to enable their functionality.
TLS=1
SCTP=1
Include modules to be installed.
Comment out this all directive:
exclude_modules?= b2b_logic jabber cpl-c xmpp rls \
mi_xmlrpc xcap_client db_mysql db_postgres db_unixodbc \
db_oracle db_berkeley aaa_radius osp perl snmpstats \
perlvdb carrierroute mmgeoip presence presence_xml presence_mwi \ presence_dialoginfo pua pua_bla pua_mi pua_usrloc \
pua_xmpp pua_dialoginfo ldap h350 identity regex memcached \ db_http json python dialplan
it should look something like this,
exclude_modules?= osp db_oracle \
#exclude_modules?= b2b_logic jabber cpl-c xmpp rls \
#mi_xmlrpc xcap_client db_mysql db_postgres db_unixodbc \
#db_oracle db_berkeley aaa_radius osp perl snmpstats \
#perlvdb carrierroute mmgeoip presence presence_xml\
#presence_mwi presence_dialoginfo pua pua_bla pua_mi \
#pua_usrloc pua_xmpp pua_dialoginfo ldap h350 identity \
#regex memcached db_http json python dialplan
I've excludede modules for osp and oracle db , as we don;t need those.
save and exit.
Now compile and install OpenSIPS
root@Osips-SBC# make all
root@Osips-SBC# make install
Copy default and the int.d startup scripts to relevant directories.
root@Osips-SBC# cd packaging/debian
root@Osips-SBC# cp opensips.default /etc/default/opensips
Edit the default file:
root@Osips-SBC# vim /etc/default/opensips
SET:
RUN_OPENSIPS=yes
Save and Exit
root@Osips-SBC# cp opensips.init /etc/init.d/opensips
Verify the binary directory of opensips package
root@Osips-SBC# ls /usr/local/sbin/opensips
should show you this output
/usr/local/sbin/opensips
Edit
/etc/init.d/opensips to know the path of the opensips executable binary
root@Osips-SBC# vim /etc/init.d/opensips
SET:
DAEMON=/usr/local/sbin/opensips
Create opensips user
root@Osips-SBC# useradd -d /etc/opensips -s /sbin/nologin opensips
SCTP module is required to be loaded in kernel before starting opensips, since e compiled opensips with SCTP support.
root@Osips-SBC# modprobe sctp
START opensips
root@Osips-SBC# /etc/init.d/opensips start
if you get this error:
grep: /etc/opensips/opensips.cfg: No such file or directory
Starting opensips: opensips already running.
Execute the following command.( but first do check with "/var/log/syslog" what is your error.I got error on different configurations directory so I created an symbolic link.)
root@Osips-SBC# ln -s /usr/local/etc/opensips /etc/
Create Database for opensips
root@Osips-SBC# cd /usr/local/etc/opensips
root@Osips-SBC# vim opensipsctlrc
Uncomment
DBENGINE=MYSQL
Save and Exit
root@Osips-SBC# opensipsdbctl create
MySQL password for root:
INFO: test server charset
INFO: creating database opensips ...
INFO: Core OpenSIPS tables succesfully created.
Install presence related tables? (y/n): y
INFO: creating presence tables into opensips ...
INFO: Presence tables succesfully created.
Install tables for imc cpl siptrace domainpolicy carrierroute userblacklist? (y/n): y
INFO: creating extra tables into opensips ...
INFO: Extra tables succesfully created.
root@Osips-SBC#
Now, Start opensips
root@Osips-SBC# /etc/init.d/opensips start
Starting opensips: opensipsListening on
udp: 127.0.0.1 [127.0.0.1]:5060
udp: 192.168.30.3 [192.168.30.3]:5060
tcp: 127.0.0.1 [127.0.0.1]:5060
tcp: 192.168.30.3 [192.168.30.3]:5060
sctp: 127.0.0.1 [127.0.0.1]:5060
sctp: 192.168.30.3 [192.168.30.3]:5060
Aliases:
sctp: Osips-SBC:5060
sctp: localhost:5060
tcp: Osips-SBC:5060
tcp: localhost:5060
udp: Osips-SBC:5060
udp: localhost:5060
.
root@Osips-SBC#
The "." here signifies that opensips has actually started. If you see anything else like "opensips has started" or "opensips is already running" then see log file for errors.
Verify that opensips is running
root@Osips-SBC# ps -ef | grep opensips
opensips 1140 1 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1147 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1148 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1149 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1150 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1151 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1152 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1153 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1154 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1155 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1156 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1157 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1158 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1159 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1160 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1161 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1162 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1163 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1164 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1165 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1166 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1167 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1168 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1169 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
opensips 1170 1140 0 14:16 ? 00:00:00 /usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 64 -u opensips -g opensips
root 1175 1274 0 14:20 pts/0 00:00:00 grep --color=auto opensips
root@Osips-SBC#
Thats all, you've successfully installed OpenSIPS. Now I'll try to upload some configurations sample file for load-balancing multiple Media-Servers(Asterisks/FreeSWITCH) servers using OpenSIPS.