User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 

OpenSips 1.6.2 on Ubuntu 9.10

 

[Prereques]

sudo -i

apt-get install perl libdbi-perl libdbd-mysql-perl libdbd-pg-perl libfrontier-rpc-perl libterm-readline-gnu-perl libberkeleydb-perl

apt-get install dh-make-perl

dh-make-perl --build --cpan DBD-Whatever

 

 

cd /

cd usr/src

mkdir opensip

cd opensip

 

apt-get install gcc bison flex make openssl libmysqlclient-dev libradiusclient-ng2 libradiusclient-ng-dev mysql-server libxmlrpc-c3-dev

 

wget http://opensips.org/pub/opensips/1.6.2/src/opensips-1.6.2-tls_src.tar.gz

 

tar -xzvf opensips-1.6.2-tls_src.tar.gz

cd opensips-1.6.2-tls

 

 

[recompile with what modules you need - Just MySQL]

make prefix=/ all include_modules="db_mysql"

make prefix=/ install include_modules="db_mysql"

 

[MySQL radius server example]

make prefix=/ all include_modules="db_mysql aaa_radius"

make prefix=/ install include_modules="db_mysql aaa_radius"

 

[you shouldn't need to do this if you did the prereques]

apt-get install libdbi-perl libdbd-mysql-perl libfrontier-rpc-perl libterm-readline-gnu-perl

 

 

[Boot on startup]

cd /usr/src/opensip/opensips-1.6.2-tls/packaging/debian

cp opensips.default /etc/default/opensips

cp opensips.init /etc/init.d/opensips

update-rc.d opensips defaults 99

 

[version less 1.6.2 edit No fork]

if running version less then 1.6.2 you will need to edit out fork=no or add a #

nano /etc/opensips/opensips.cfg

#fork=no

 

[Set permission for daemon]

cd /etc/init.d

chmod 755 opensips

 

[Set Correct Path]

nano /etc/init.d/opensips

change:

DAEMON=/usr/sbin/opensips

to:

DAEMON=/sbin/opensips

[save]

 

restart the box verify the open sip starts up

sudo -i

opensips

[should see]

Listening on

udp: 127.0.0.1 [127.0.0.1]:5060

udp: 192.168.1.101 [192.168.1.101]:5060

tcp: 127.0.0.1 [127.0.0.1]:5060

tcp: 192.168.1.101 [192.168.1.101]:5060

Aliases:

tcp: localhost:5060

udp: localhost:5060

[change the password in the config file]

nano /etc/init.d/opensips