Escolar Documentos
Profissional Documentos
Cultura Documentos
0
sdfasfasdf
2010.11.25
Project Team
Marco Pierobon (15)
Michel Hognerud (30)
Nina Mulkijanyan (24)
Prajwol Kumar Nakarmi (30)
Sharique Javaid (15)
Sujan Dey (15)
Syed Saad Ali (30)
Venkatesh Change Gowda (24)
Project Owners
marco87c@hotmail.it
hognerud@kth.se
ninamu@kth.se
nakarmi@kth.se
sharique@kth.se
sujan@kth.se
ssali3@kth.se
vch@kth.se
Project Coach
Hans Eriksson hansa@me.com
Project Champion
Bjrn Pehrson bpehrson@kth.se
Page 1 of 10
Development partner:
Revision History
Version
Date
Remarks
Authors
1.0
2010-11-25
Document creation
Page 2 of 10
Table of Contents
Revision History ...................................................................................................................................... 2
1. Introduction ........................................................................................................................................ 4
1.1 Purpose ......................................................................................................................................... 4
1.2 Scope ............................................................................................................................................. 4
1.3 Target audience ............................................................................................................................ 4
2. OpenSIPS installation .......................................................................................................................... 5
2.1 Assumptions .................................................................................................................................. 5
2.2 Installation .................................................................................................................................... 5
3. OpenSIPS module configuration ......................................................................................................... 6
3.1 MySQL module .............................................................................................................................. 6
Prerequisites ................................................................................................................................... 6
Step-by-step instruction ................................................................................................................. 6
3.2 DB authentication module ............................................................................................................ 6
Prerequisites ................................................................................................................................... 6
Step-by-step instruction ................................................................................................................. 7
3.3 Presence module .......................................................................................................................... 8
Prerequisites ................................................................................................................................... 8
Step-by-step instruction ................................................................................................................. 8
4. References ........................................................................................................................................ 10
Page 3 of 10
1. Introduction
1.1 Purpose
The purpose of the document is to provide instruction to install and configure OpenSIPS server on
Linux OS. The document also includes the guide to configure OpenSIPS authentication and presence
modules.
1.2 Scope
The scope of the document covers the minimal installation of OpenSIPS software and configuration
of authentication and presence modules.
Page 4 of 10
2. OpenSIPS installation
2.1 Assumptions
2.2 Installation
1) Add OpenSIPS repository to source.list
sudo vim /etc/apt/sources.list
# debian.leurent.eu (Stable version)
deb http://debian.leurent.eu/debian stable main
deb-src http://debian.leurent.eu/debian/ stable main
sudo aptitude update
aptitude install -y leurent-archive-keyring
sudo aptitude update
2) Install OpenSIPS
sudo apt-get install opensips
sudo vim /etc/default/opensips
RUN_OPENSIPS=YES
sudo apt-get install opensips
3) Create run directory
sudo vim /etc/init.d/opensips
[ -d $HOMEDIR ] || mkdir $HOMEDIR
4) Edit opensipsctlrc file
sudo vim /etc/opensips/opensipsctlrc
Uncomment following line and replace domain.com with the default SIP domain.
SIP_DOMAIN=domain.com
5) Run OpenSIPS
sudo /etc/init.d/opensips start
6) Test the installation
sudo netstat -tulp | grep opensips
Page 5 of 10
Page 6 of 10
/etc/opensips/opensips.cfg
modparam("auth_db", "db_url",
"mysql://username:password@localhost/opensips")
Replace opensips, username, password with database name specified in opensipsctlrc,
username for the database and password correspondingly
For authentication with plaintext passwords stored in database
modparam("auth_db", "calculate_ha1", 1)
modparam("auth_db", "password_column", "password")
For authentication with only password hashes stored
modparam("auth_db", "calculate_ha1", 0)
modparam("auth_db", "password_column", "ha1")
In main route uncomment and replace domain with
a) default SIP domain for disabling storing plaintext passwords
b) IP address of the server for enabling storing plaintext passwords
#authenticate the REGISTER requests (uncomment to enable auth)
if (!www_authorize("domain", "subscriber"))
{
www_challenge("domain", "0");
exit;
}
3) Restart OpenSIPS
sudo service opensips restart
4) To create the user use command
sudo opensipsctl add username password
Page 7 of 10
exit;
3) Restart OpenSIPS
sudo service opensips restart
Page 9 of 10
4. References
[1] OpenSIPS home page, http://opensips.org Referenced November 25th,2010
Page 10 of 10