Žilinská univerzita > Fakulta riadenia a informatiky > Katedra informačných sietí

OpenSIPs Control Panel installation on Debian

Installation OpenSIPs Control Panel on Debian Squeeze 32 bit.


 Control pannel does not work correctly yet !!!


Download tarball from http://opensips-cp.sourceforge.net/
upack into /var/www/ directory


Installation of apache server:

install apache2
apt-get install apache2

in file /etc/apache2/apache2.conf add

Alias /cp /var/www/opensips-cp/web

run next command to make access.log file writeable by apache

chown www-data.www-data /var/www/opensips-cp/config/access.log


Installation of php support:

apt-get install php5

 in file /etc/php5/apache2/php.ini add following lines


next option needs to be set into your /etc/php5/apache2/php.ini

short_open_tag = On


Installation of php-pear and MDB2 package with driver for mysql

apt-get install php5-mysql php-pear

pear install MDB2
pear install MDB2#mysql
pear install log

For the admin tool you must add a table ocp_admin_privileges. Run the following script:

mysql -D opensips -p < /var/www/opensips-cp/config/tools/admin/add_admin/ocp_admin_privileges.mysql

To create an admin account with the following username and password: admin/admin

mysql -p
use opensips

INSERT INTO ocp_admin_privileges (username,password,ha1,available_tools,permissions)
values ('admin','admin',md5('admin:admin'),'all','all');


For the cdrviewer tool you must add a table and a stored procedure to the OpenSIPS database:

mysql -D opensips -p < /var/www/opensips-cp/config/tools/system/cdrviewer/cdrs.mysql

mysql -D opensips -p < /var/www/opensips-cp/config/tools/system/cdrviewer/opensips_cdrs_1_6.mysql

Edit hostname,username,password and database in /var/www/opensips-cp/cron_job/generate-cdrs_mysql.sh to correct values


edit cron table

crontab -e

add in it following line for execute this scrip every 3 minutes

*/3 * * * * root /var/www/opensips-cp/cron_job/generate-cdrs_mysql.sh

add into file /var/www/opensips-cp/config/globals.php

$config->table_aliases = array("DBaliases"=>"dbaliases");
$config->permissions = array("read-only","read-write");

in file /var/www/opensips-cp/config/db.inc.php edit statements to correct values

//database connection password
$config->db_pass = "student";

in file /var/www/opensips-cp/config/boxes.global.inc.php edit statements to correct values

look at



// mi host:port pair || fifo_file

// monit host:port


Restart apache server

/etc/init.d/apache2 restart

in your browser try


and login with created login/password


Control pannel does not work correctly yet.