It is very hard to manage thousands of users manually, so a user-provisioning tool becomes very important in our process. In this article by Flavio E.Goncalves, we are going to see two of these tools—SerMyAdmin and OpenSIPS Control Panel (OpenSIPS-CP). SerMyAdmin is more focused on the administration of the users, while OpenSIPS-CP is excellent for monitoring and provisioning parameters to the system. By the end of this article, you will be able to:
- Identify why you need a user portal for administration
- Install SerMyAdmin and its dependencies
- Configure resources such as administrator and user access
- Add and remove domains
- Customize the portal with the colors and logos of your company
- Install and configure OpenSIPS Control Panel
- Use opensips-cp for daily tasks
OpenSIPS Control Panel
This tool, also known as opensips-cp, is the new graphical user interface for the SIP proxy. It was designed to be the primary tool to provision parameters for the OpenSIPS modules in the database.

The screenshot shows the tools available for OpenSIPS Control Panel. This tool is focused on the provisioning of system parameters. As it is usual for the VoIP providers to develop their own interface with the end users, the tools to manage end users are not available. Developed using PHP, opensips-cp currently features the following modules:
- CDRviewer
- dialplan
- domains
- dispatcher
- drouting
- load balancer
- Mi
- Monit
- nathelper
- pdt
- Permissions
- siptrace
- smonitor
Installation of opensips-cp
The step-by-step instructions to install opensips-cp in a server with Debian 5.0 are as follows:
Installation instructions change very often. For updates, check the opensips-cp project's website at http://opensipscp.sourceforge.net/.
Step 1: Install Apache and PHP as follows:
apt-get install apache2 php5
Step 2: Install php5-mysql and php5-xmlrpc packages, and set the right parameters in the php.ini file. (It has been done for you to save time.)
apt-get install php5-mysql php5-xmlrpc php-pear
vi /etc/php5/apache2/php.ini
Please verify that you have set the short_open_tag = On ; option in your php.ini file.
Step 3: Download opensips-cp and untar the file.
Download opensips-cp from http://opensips-cp.sourceforge.net/index.php?req=download (or copy from DVD) and copy the opensip-cp_3.0.tgz file to /var/www as follows:
cd /var/www
wgethttp://sourceforge.net/projects/opensips-cp/files/opensipscp/
3.0/opensips-cp_3.0.tgz/download
tar -xzvf opensips-cp_3.0.tgz
chown www-data:www-data opensips-cp -R
Step 4: Install MDB2.
pear install MDB2
pear install MDB2#mysql
pear install log
Step 5: Configure Apache for OpenSIPS Control Panel. Edit the apache2.conf file.
vi /etc/apache2/apache2.conf
After doing so, include the following line below the last line:
Alias /cp "/var/www/opensips-cp/web"
Also, change the owner of the log file:
chown www-data:www-data /var/www/opensips-cp/config/access.log
Step 6: Install the cdr table schema:
cd /var/www/opensips-cp/web/tools/cdrviewer
mysql -D opensips -p < cdrs.sql
mysql -u root -p
mysql> use opensips
mysql -D opensips -p < opensips_cdrs_1_6.mysql
Step 7: Edit the cron_job/generate-cdrs.sh file and change the MySQL connection data (hostname, username, password, and database) as follows:
cd /var/www/opensips-cp/cron-job
vi generate_cdrs.sh
Step 8: Edit the /etc/crontab file and add the following line for a three-minute interval:
vi /etc/crontab
*/3 * * * * root /var/www/opensips-cp/cron_job/generate-cdrs.sh
Step 9: For the smonitor module, you must add two tables to the OpenSIPS database:
cd /var/www/opensips-cp/web/tools/smonitor
mysql -p opensips <tables.sql
Step 10: Add a cron job that collects data from the OpenSIPS machine(s). Here is a cron job that collects data at a one-minute interval. (This interval is not arbitrary. It must be set to one minute by design.)
vi /etc/crontab
* * * * * root php /var/www/opensips-cp/cron_job/get_opensips_stats.php >
/dev/null
The cron jobs do not need to run as root. You might want to change the user.
Step 11: Restart OpenSIPS and Apache.
Sign up for a Packt account to see the rest of this article
Now that you've read a few articles, you might want to consider signing up for a Packt account. It takes a matter of seconds, will give you access to all the articles on PacktPub.com, and once you've signed up you'll be returned here to carry on reading your article.
Furthermore, you'll gain access to nine free ebooks, and be offered a free trial of PacktLib, Packt's online library. Simply enter your details here, or log in to your existing account.




Post new comment