Install OpenSIPS on Debian or Ubuntu

Posted: July 28, 2009 in Unix area
Tags: , , , , , , , ,

This is long time draft before being published,,,,

You may known that OpenSIPS is the project continuation of OpenSER, tough Kamailio is said to be closer to OpenSER. But after all, it’s all about taste,,lol 😀

OpenSIPS will be best deployed on Sun machine running Solaris OS to obtain it’s best performance. But installing on Debian or Ubuntu machine will much easier. OpenSIPS modules depend on various package which is hard to get for Solaris. Debian or Ubuntu will be the best OS for installing practice. To get familiar with OpenSIPS, you’ll may need to practice installing too :D.

OpenSIPS is recommended to install with DNS. So that you wouldn’t have a lot of changes to move the system from a machine to another. These steps I’ve used to build a presence system server with TLS enabled. If you don’t need any presence enabled, you may leave mi_xmlrpc, xcap_client, presence, presence_xml, presence_mwi, presence_dialoginfo, pua, pua_bla, pua_mi, pua_usrloc, pua_xmpp,  pua_dialoginfo, and TLS=1 commented.
It’s hard to find a good OpenSIPS installation tutorial, so I try to write these steps which is work for me. Hopefully these steps will help you much 😀

1. sudo apt-get install bison bison++ bisonc++
2. sudo apt-get install flex
3. sudo apt-get install libsctp1
4. sudo apt-get install mysql-server
5. sudo apt-get install libmysqlclient-dev
6. sudo apt-get install libxml2-dev
7. sudo apt-get install libexpat1-dev
8. sudo apt-get install libradius-ng2 libradius-ng-dev
9. sudo apt-get install libcurl3-dev
10. sudo apt-get install libxmlrpc-c3 libxmlrpc-c3-dev
11. sudo apt-get install libperl-dev
12. sudo apt-get install libsnmp-dev
13. sudo apt-get install libconfuse0 libconfuse-dev
14. sudo apt-get install build-essential
15. sudo tar xvfz opensips-1.5.0-tls_src.tar.gz
16. edit opensips-1.5.0-tls/Makefile/
change : #TLS=1
to : TLS=1
remove : – jabber
– cpl-c
– xmpp
– rls
– mi_xmlrpc
– xcap_client
– db_mysql
– presence
– presence_xml
– presence_mwi
– presence_dialoginfo
– pua
– pua_bla
– pua_mi
– pua_usrloc
– pua_xmpp
– pua_dialoginfo
– perl
– snmpstats
– peering
– carrierroute
from : exclude_modules=
17. sudo make
18. sudo make install
19. sudo cp opensips-1.5.0-tls/packaging/debian-etch/opensips.default /etc/default/opensips
sudo cp opensips-1.5.0-tls/packaging/debian-etch/opensips.init /etc/init.d/opensips
20. sudo nano /etc/default/opensips
change : RUN_OPENSIPS=no
to : RUN_OPENSIPS=yes
21. sudo nano /etc/init.d/opensips
change : DAEMON=/usr/sbin/opensips
RUN_OPENSIPS=no
to : DAEMON=/usr/local/sbin/opensips
RUN_OPENSIPS=yes
22. sudo chmod +x /etc/init.d/opensips
23. sudo groupadd opensips
sudo useradd -g opensips opensips
24. sudo mkdir /var/run/opensips
sudo chmod 777 /var/run/opensips
25. sudo chmod 777 /usr/local/etc/opensips/
26. sudo apt-get install bind9
27. sudo nano /etc/bind9/named.conf
add : zone “opensips.org” {
type master;
file “/etc/bind/db.opensips”;
};

zone “18.14.10.in-addr.arpa” {
type master;
file “/etc/bind/db.18.14.10″;
};
28. Create new RR file

sudo nano /etc/bind9/db.opensips
write :

;
; BIND data file for opensips.org
;
$TTL 604800
@ IN SOA opensips.org. root.opensips.org. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
IN NS opensips.org.
opensips.org. IN A 10.14.18.56
29.  Create new RR file

sudo nano /etc/bind9/db.18.14.10
add :

;
; BIND data file for opensips.org
;
$TTL 604800
@ IN SOA opensips.org. root.opensips.org. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
IN NS opensips.org.
opensips.org. IN A 10.14.18.56
30. sudo nano /etc/bind9/named.conf.option
add : recursion no;
in : option { }
31. sudo /etc/init.d/bind9 restart
32. sudo nano /usr/local/etc/opensips/opensipsctlrc
uncomment : # SIP_DOMAIN=opensips.org
# DBENGINE=MYSQL
# DBHOST=localhost
# DBNAME=opensips
# DBRWUSER=opensips
# DBRWPW=”opensipsrw”
# DBROUSER=opensipsro
# DBROPW=opensipsro
# DBROOTUSER=”root”
# USERCOL=”username”
# INSTALL_EXTRA_TABLES=ask
# INSTALL_PRESENCE_TABLES=ask
uncomment and change :
# PID_FILE=/var/run/opensips.pid
to : PID_FILE=/var/run/opensips/opensips.pid
33. sudo mysqladmin -u root password ‘root’
34. sudo opensipsdbctl create
35. sudo nano /usr/local/etc/opensips/opensips.cfg
uncomment : #loadmodule “db_mysql.so”
#loadmodule “auth.so”
#loadmodule “auth_db.so”

#modparam(“usrloc”, “db_mode”, 2)
#modparam(“usrloc”, “db_url”,
# “mysql://opensips:opensipsrw@localhost/opensips”)

#modparam(“auth_db”, “calculate_ha1”, yes)
#modparam(“auth_db”, “password_column”, “password”)
#modparam(“auth_db”, “db_url”,
# “mysql://opensips:opensipsrw@localhost/opensips”)

comment : modparam(“usrloc”, “db_mode”, 0)
36. sudo nano mysql -u root -p
mysql> GRANT ALL PRIVILEGES ON *.* TO opensips@localhost IDENTIFIED BY ‘opensipsrw’;
mysql> GRANT ALL PRIVILEGES ON *.* TO opensips@127.0.0.1 IDENTIFIED BY ‘opensipsrw’;
37. start opensips, choose one of these method:
1. sudo opensipsctl start
2. sudo /etc/init.d/opensips start
38. sudo opensipsctl add 1001 1001

You can use any kind of SIP client you have. These install will be default enable your SIP chat.

Comment me if you have any error on installation. Feel free to try 😀

Comments
  1. […] OpenSIPS will be best deployed on Sun machine running Solaris OS to obtain it’s best performance. But installing on Debian or Ubuntu machine will much easier. OpenSIPS modules depend on various package which is hard to get for Solaris. Debian or Ubuntu will be the best OS for installing practice. More here […]

  2. shawnrin says:

    hi,Doddy.I got a error: PID FILE /var/run/opensips/opensips.pid dosenot exist.
    However i have uncommented the PID_FILE=/var/run/opensips.pid in opensipsctlrc,
    do u have some idea?
    Thanks.

    • Doddy says:

      hi Shawnrin,

      PID FILE /var/run/opensips/opensips.pid does not exist occurs for 2 causes:
      First, if you have problems with login permission currently in use. Make sure your login has permission to create file on /var/run/opensips and modify it. Following my steps should not get you into this problem.
      Second, if your opensips.cfg configuration is not correct. Make sure every line on opensips.cfg is written properly.

      Tips: if you plan to make changes on opensips.cfg, it’s better to do step by step (load module first and run opensips service. continue to parameter config if this config works)

  3. […] Anyone wants to install opensips on Ubuntu,can access to Doddy’s blog  click here. Categories: VOIP Comments (0) Trackbacks (0) Leave a comment […]

  4. bougdira says:

    hello,
    thank you for your tutorial,my question if i can give an adresse IP to opensips than use localhost, tell me whats the file i can update it , thank you for your help

  5. Doddy says:

    hi Bougdira,

    yes you can give IP address instead of localhost.
    Make sure there’s no connection and miss-configuration issue on both side when you use IP address 😀

  6. Vinodh says:

    Hi,

    I have followed the steps completely and i am able to start the server and every thing works fine…

    But without performing the steps# 38. sudo opensipsctl add 1001 1001

    I am able to register the sip clients (x-lite) to the opensips server.

    I am using any username and password with opensips server IP and its getting registered. Some authentication issues.

    suggest me how to proceed from here..

    Thanks in advance.

    vinodh.

  7. Schedule says:

    You you could edit the blog title Install OpenSIPS on Debian or Ubuntu doddy’s page to something more catching for your blog post you make. I enjoyed the post however.

  8. Pradeep says:

    Hi,

    Thanks a ton for your help, I have stuckup @ point 27

    27. sudo nano /etc/bind9/named.conf
    add : zone “opensips.org” {
    type master;
    file “/etc/bind/db.opensips”;
    };

    zone “18.14.10.in-addr.arpa” {
    type master;
    file “/etc/bind/db.18.14.10″;
    };
    28. sudo nano /etc/bind9/db.opensips

    My Question is :

    a) What will opensips.org & 18.14.10.in-addr.arpa …..?
    b) And also i don’t have /etc/bind9/named.conf instead i have /etc/bind/named.conf

    So please needs your inputs,

    Thanking you in advance,
    Pradeep

  9. Doddy says:

    @Vinodh: sorry for late responding. Do your issue solved? You can check on the authentication line configuration further

    @Schedule: thank you for your suggestion. I guess I’m too busy working with my servers and routers that I’m spending not much time with this blog 🙂

    @Pradeep: halo there. here are my answers:
    a) opensips.org is your machine domain name. you can change this to any name you want, but take care for what you need to change on other lines. 18.14.10.in-addr is for reverse lookup (query what is the domain name of an ip address). this might be not very useful on opensips operation. just in case the systems need reverse lookup. maybe it will be interesting for you to read more about DNS
    b) it depends on what OS you are using. on Debian with bind 9, I got /etc/bind9/named.conf. Other version of OS or BIND could give you a little different file location

    Thanks all for visiting my page 🙂

  10. Pradeep says:

    Thanks for your Qick reply,

    After doing this

    27. sudo nano /etc/bind9/named.conf
    add : zone “ind.csscorp.com” {
    type master;
    file “/etc/bind/db.csscorp”;
    };

    zone “172.26.209.50.in-addr.arpa” {
    type master;
    file “/etc/bind/db.172.26.209.50″;
    };

    ******* If i say the below 28th Command it says “New File” but nothing it displays.

    28. sudo nano /etc/bind9/db.opensips

    Please correct if any mistakes.

    Thanks,
    Pradeep

  11. Doddy says:

    Hi Pradeep,

    Step 28 as well as 29 is creating new RR file. Sorry for miss understanding. I have correct the instruction on both step 28 and 29. This RR files should be typed correctly. Please refer to any DNS source material for deep understanding this part

  12. Pradeep says:

    Hi,

    Thanks buddy, now I am stuck up @ step 33.

    33. sudo mysqladmin -u root password ‘root’

    mysqladmin: connect to server at ‘localhost’ failed
    error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’

    Also If i go directly to step 34
    34. sudo opensipsdbctl create

    root@gconf1-apac:~# sudo opensipsdbctl create
    MySQL password for root:
    INFO: test server charset
    ERROR 2003 (HY000): Can’t connect to MySQL server on ‘172.26.248.134’ (111)
    ERROR 2003 (HY000): Can’t connect to MySQL server on ‘172.26.248.134’ (111)
    Usage: grep [OPTION]… PATTERN [FILE]…
    Try `grep –help’ for more information.
    /usr/local/lib64/opensips/opensipsctl/opensipsdbctl.mysql: line 114: [: =: unary operator expected
    INFO: creating database opensips …
    ERROR 2003 (HY000): Can’t connect to MySQL server on ‘172.26.248.134’ (111)
    ERROR: Creating core database and grant privileges failed!
    root@gconf1-apac:~#

    Thanks,
    Pradeep

  13. Doddy says:

    On making these steps, I assume that we build new system with new mysql. On Debian 5 Lenny with it’s mysql on repository, after first install mysql should have root account with no password. On your case, it seems that your mysql root account has a password before. If so, you don’t need to do step 33. Go ahead on step 34 and enter your correct mysql root password.

  14. Pradeep says:

    Okies, Thanks.

    But even I go ahead for step @34, I get following error:

    root@gconf1-apac:~# sudo opensipsdbctl create
    MySQL password for root:
    INFO: test server charset
    ERROR 2003 (HY000): Can’t connect to MySQL server on ‘172.26.248.134’ (111)
    ERROR 2003 (HY000): Can’t connect to MySQL server on ‘172.26.248.134’ (111)
    Usage: grep [OPTION]… PATTERN [FILE]…
    Try `grep –help’ for more information.
    /usr/local/lib64/opensips/opensipsctl/opensipsdbctl.mysql: line 114: [: =: unary operator expected
    INFO: creating database opensips …
    ERROR 2003 (HY000): Can’t connect to MySQL server on ‘172.26.248.134’ (111)
    ERROR: Creating core database and grant privileges failed!

    Thanks,
    Pradeep

  15. Pradeep says:

    Okies, Thanks.

    But even I go ahead for step @34, I get following error:

    root@gconf1-apac:~# sudo opensipsdbctl create
    MySQL password for root:
    INFO: test server charset
    ERROR 2003 (HY000): Can’t connect to MySQL server on ’172.26.248.134′ (111)
    ERROR 2003 (HY000): Can’t connect to MySQL server on ’172.26.248.134′ (111)
    Usage: grep [OPTION]… PATTERN [FILE]…
    Try `grep –help’ for more information.
    /usr/local/lib64/opensips/opensipsctl/opensipsdbctl.mysql: line 114: [: =: unary operator expected
    INFO: creating database opensips …
    ERROR 2003 (HY000): Can’t connect to MySQL server on ’172.26.248.134′ (111)
    ERROR: Creating core database and grant privileges failed!

    Thanks,
    Pradeep

  16. Pradeep says:

    Thanks again for your reply,

    But I m little bit confused, i have not set any password for MYSQL & also i followed the steps what you mentioned above. So in that if MYSQL is installed then i have not given any password as such.

    So after trying with password root or root01 i m getting the below errors.

    root@gconf1-apac:~# sudo opensipsdbctl create
    MySQL password for root:
    INFO: test server charset
    ERROR 2003 (HY000): Can’t connect to MySQL server on ’172.26.248.134′ (111)
    ERROR 2003 (HY000): Can’t connect to MySQL server on ’172.26.248.134′ (111)
    Usage: grep [OPTION]… PATTERN [FILE]…
    Try `grep –help’ for more information.
    /usr/local/lib64/opensips/opensipsctl/opensipsdbctl.mysql: line 114: [: =: unary operator expected
    INFO: creating database opensips …
    ERROR 2003 (HY000): Can’t connect to MySQL server on ’172.26.248.134′ (111)
    ERROR: Creating core database and grant privileges failed!

    Kindly help.

    Thanks,
    Pradeep

  17. Doddy says:

    Hi again…

    Try to log on your mysql using root

    # mysql -u root -p
    or
    # mysql -u root

    which one is working? -p option indicate the login will need a password. From the capture you give above, I can say that this is obviously mysql login problem. If you are using Debian family, perhaps you want a shortcut with reinstall mysql

    # sudo apt-get remove mysql-server
    # sudo apt-get install mysql-server

    Then re-define mysql root password

    # sudo mysqladmin -u root password ‘root’

  18. Pradeep says:

    Hi,

    Thanks for taking time for me:

    So i did this below one

    root@gconf1-apac:~# mysql -u root -p
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 69
    Server version: 5.1.41-3ubuntu12.9 (Ubuntu)

    Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

    mysql>

    *****So I entered root01 & it tooks me to mysql> *******
    After this I tried with password root01 & again same problem.
    Server version: 5.1.41-3ubuntu12.9 (Ubuntu)

    root@gconf1-apac:~# sudo opensipsdbctl create
    MySQL password for root:
    INFO: test server charset
    ERROR 2003 (HY000): Can’t connect to MySQL server on ’172.26.248.134′ (111)
    ERROR 2003 (HY000): Can’t connect to MySQL server on ’172.26.248.134′ (111)
    Usage: grep [OPTION]… PATTERN [FILE]…
    Try `grep –help’ for more information.
    /usr/local/lib64/opensips/opensipsctl/opensipsdbctl.mysql: line 114: [: =: unary operator expected
    INFO: creating database opensips …
    ERROR 2003 (HY000): Can’t connect to MySQL server on ’172.26.248.134′ (111)
    ERROR: Creating core database and grant privileges failed!

    Kindly Suggest,

    Thanks,
    Pradeep

  19. Pradeep says:

    Also Please check Tried the below one also:

    root@gconf1-apac:~# sudo apt-get remove mysql-server
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    The following packages will be REMOVED:
    mysql-server
    0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
    After this operation, 131kB disk space will be freed.
    Do you want to continue [Y/n]? Y
    (Reading database … 281786 files and directories currently installed.)
    Removing mysql-server …
    root@gconf1-apac:~# sudo apt-get install mysql-server
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    The following NEW packages will be installed:
    mysql-server
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 94.8kB of archives.
    After this operation, 131kB of additional disk space will be used.
    Get:1 http://ubuntumirror.mirror.corp.google.com/ubuntu/ lucid-updates/main mysql-se
    Fetched 94.8kB in 0s (894kB/s)
    Selecting previously deselected package mysql-server.
    (Reading database … 281784 files and directories currently installed.)
    Unpacking mysql-server (from …/mysql-server_5.1.41-3ubuntu12.9_all.deb) …
    Setting up mysql-server (5.1.41-3ubuntu12.9) …
    root@gconf1-apac:~# sudo mysqladmin -u root password ‘root’
    mysqladmin: connect to server at ‘localhost’ failed
    error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’
    root@gconf1-apac:~# sudo mysqladmin -u root password
    mysqladmin: connect to server at ‘localhost’ failed
    error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’
    root@gconf1-apac:~# sudo mysqladmin -u root password ‘root01’
    mysqladmin: connect to server at ‘localhost’ failed
    error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’
    root@gconf1-apac:~#

  20. Pradeep says:

    Pradeep :
    Also Please check Tried the below one also:
    root@gconf1-apac:~# sudo apt-get remove mysql-server
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    The following packages will be REMOVED:
    mysql-server
    0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
    After this operation, 131kB disk space will be freed.
    Do you want to continue [Y/n]? Y
    (Reading database … 281786 files and directories currently installed.)
    Removing mysql-server …
    root@gconf1-apac:~# sudo apt-get install mysql-server
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    The following NEW packages will be installed:
    mysql-server
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 94.8kB of archives.
    After this operation, 131kB of additional disk space will be used.

    Fetched 94.8kB in 0s (894kB/s)
    Selecting previously deselected package mysql-server.
    (Reading database … 281784 files and directories currently installed.)
    Unpacking mysql-server (from …/mysql-server_5.1.41-3ubuntu12.9_all.deb) …
    Setting up mysql-server (5.1.41-3ubuntu12.9) …
    root@gconf1-apac:~# sudo mysqladmin -u root password ‘root’
    mysqladmin: connect to server at ‘localhost’ failed
    error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’
    root@gconf1-apac:~# sudo mysqladmin -u root password
    mysqladmin: connect to server at ‘localhost’ failed
    error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’
    root@gconf1-apac:~# sudo mysqladmin -u root password ‘root01′
    mysqladmin: connect to server at ‘localhost’ failed
    error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’
    root@gconf1-apac:~#

  21. Pradeep says:

    Hi,

    Any help please on the above error, please correct me if any mistakes are done.

    Thanks,
    Pradeep

  22. hello…
    i want to ask you about opensips.cfg
    i want to make realisation of ipv6/ipv4 VoIP SIP integration
    could i get the script of opensips.cfg??

    thank you so much fo your help

  23. Doddy says:

    @Pradeep : Hi, sory for long offline 🙂
    Did you solve the issue?

    @Adddinisa : Hi Nisa, you could find the line on opensips.cfg somewhere about rtproxy parameter

  24. Pradeep says:

    hey Doddy,

    Thanks for replying, dude still i m stuck up there itself. You can check my last POST. Please do help.

    Thanks,
    -Pradeep

  25. Pradeep says:

    Hi Doddy, no still stuck up at same stage, need your help.

    Thanks,
    Pradeep

  26. Abhishek says:

    Hi Doddy,

    I followed all the steps you mentioned to install OPENSIPS…All steps were sucessfull…Thank you very much for making the installation so easy…I need some advice from you.

    I am planning to test SCTP between a client and server. Now that I have OPENsips which support sctp. I am looking for a good SIP client which can run on SCTP. I know about linphone, kphonem ekiga and a few others. Do you have any idea of a SIP client which I can use to test client and server communication with SCTP instead of default UDP. Once again thank you very much for your help.

    Best Regards,
    Abhishek

  27. Doddy says:

    @Adddinisa, IMHO it is better to understand C language first before you do further with opensips.cfg. When I’m working with this file, a single mistake could lead to overall opensips service. Basically, you need to understand only basic C syntax and then go further with your work 😀

    @Pradeep, seriously this is your mysql problem. I can’t speculate this is MySQL bug or any other problem, but referring to Abishek comment above, the steps I wrote are all successfully done. Please have any reference related to mysql error problem at mysql forum 😀

    @Abishek, I actually haven’t try SCTP features, but I ever read somewhere about SIP SCTP client. Have a try with Kphone, if I’m not mistaken you can download it here http://sourceforge.net/projects/kphone/. Have a share of the review on this post comment here if you don’t mind 😀

  28. Pradeep says:

    Hey Doddy,

    Thanks for all your help. Sorry for troubling you, yes it was some mistake with my SQl done by me. Now its fine. But now i m stuck up @ last step:

    When I do below steps:
    1. sudo opensipsctl start
    2. sudo /etc/init.d/opensips start

    Getting following error: “ERROR: PID file /var/run/opensips/opensips.pid does not exist — OpenSIPS start failed”

    So anything missing myself, your help needed.

    Thanks,
    Pradeep

  29. Doddy says:

    Hi Pradeep, what you have is the same with Shawnrin problem.
    As I have explained on the comment replying Shawnrin question, this problem occurs because one or both causes below:
    – misconfiguration on opensips.cfg.
    As I said on previous comments, you need to be very careful changing lines on opensips.cfg. One character missing could lead you to this PID file error.
    – permission/folder problem
    The problem can also occurs due to you don’t have /var/run/opensips or you already have it but your login don’t have permission to modify the folder. Have a reference on how change file/folder attribute to open permission

  30. Pradeep says:

    Hi Doddy,

    Thanks a lot for the reply, as you said “The problem can also occurs due to you don’t have /var/run/opensips “, so i don’t find this directory “opensips” in /var/run. Also verified the configuration on opensips.cfg its correct as per your steps.

    So what could be the issue so i can’t see opensips in /var/run/opensips

    Thanks,
    Pradeep

  31. Abhishek says:

    Hi Doddy,

    Great..Thank you for replying….

    I have downloaded K-Phone…I am going to try it today…I will update you as soon as I am done..But still I have a question…

    When I log in to ubuntu..I get two choices to login..
    1. Abhishek – my login name
    2. Opensips

    I dont think I have given any password for this..The only thing I remember was giving password for mysql…Can you please guide me on this..

    Thank you for all your help..

    Best Regards,
    Abhishek

  32. Doddy says:

    @Pradeep, try to create /var/run/opensips directory and chmod the folder to allow opensips user modify it

    @Abishek, AFAIK the ‘opensips’ user is used by opensips daemon running on background. You don’t need to worry about this login. If I’m not mistaken, such login without password like this will not be able to be used for ssh access (except you are using certificate login). But, to ensure your system is secure, you can modify sshd_config file to deny ssh login for this user.

  33. Abhishek says:

    Hi Doddy,

    Thank you replying.

    My OPENSIPS was running fine. One fine day when I was trying to run with “sudo opensipsctl start” I got the following error.
    =================================
    INFO: Starting OpenSIPS :

    ERROR: PID file /var/run/opensips/opensips.pid does not exist — OpenSIPS start failed
    ============================================================================

    I checked /var/run/ but couldn’t find opensips directory even after following step 24. I read previous posts about this error (the two causes)..I verified changes by doing “sudo nano /usr/local/etc/opensips/opensips.cfg” and “sudo nano /usr/local/etc/opensips/opensipsctlrc” but opensips.pid is not getting created. Can you provide me some tips on this.

    Appreciate your help on this. Thank you very much

    Best Regards,
    Abhishek

  34. Abhishek says:

    Hi Doddy,

    Thank you getting back.

    My OPENSIPS was running fine. One fine day when I was trying to run with “sudo opensipsctl start” I got the following error.
    =================================
    INFO: Starting OpenSIPS :

    ERROR: PID file /var/run/opensips/opensips.pid does not exist — OpenSIPS start failed
    ============================================================================

    I checked /var/run/ but couldn’t find opensips directory even after following step 24. I read previous posts about this error (the two causes)..I verified changes by doing “sudo nano /usr/local/etc/opensips/opensips.cfg” and “sudo nano /usr/local/etc/opensips/opensipsctlrc” but opensips.pid is not getting created. Can you provide me some tips on this.

    Appreciate your help on this. Thank you very much

    Best Regards,
    Abhishek

  35. Doddy says:

    Hi Abhishek, what was the last change you’ve made?
    Very often, I have this error when I’m making mistakes with changes on opensips.cfg

    • Abhishek says:

      Hey Doddy,

      I followed all your steps..It was working fine..it was listening on some UDP ports..After a few days when I started opensips by using the command which you gave I started getting these errors…I did not see the opensips folder in /var/run…Now I have made that folder…I verified the changes made in /usr/local/etc/opensips/opensips.cfg…All the “comment” and “uncomment” which were done were ok..I restarted after doing this but still the same error appears…

      I am still trying to get the source code of Kphone from the developer…Unable to sync up with him.Once I get it I will update the details..

      Thanks much Doddy…Appreciated..

      Best Regards,
      Abhishek

  36. Abhishek says:

    Hello Doddy,

    Sorry for repeating…but following is the output I am getting:

    abhishek@ubuntu:~$ sudo /etc/init.d/opensips start
    grep: /etc/opensips/opensips.cfg: No such file or directory
    Starting opensips: opensipsListening on
    udp: 127.0.0.1 [127.0.0.1]:5060
    udp: 192.168.1.54 [192.168.1.54]:5060
    tcp: 127.0.0.1 [127.0.0.1]:5060
    tcp: 192.168.1.54 [192.168.1.54]:5060
    Aliases:
    tcp: ubuntu.local:5060
    tcp: localhost:5060
    udp: ubuntu.local:5060
    udp: localhost:5060

    .
    abhishek@ubuntu:~$ sudo opensipsctl start

    INFO: Starting OpenSIPS :

    ERROR: PID file /var/run/opensips/opensips.pid does not exist — OpenSIPS start failed
    abhishek@ubuntu:~$

  37. Abhishek says:

    Hi Doddy,

    I sent you a message post no 35 or 37..I dont know what happened it disappeared.

    Thanks for getting back though. I was thinking of reinstalling opensips again. Can you tel me if this would be good idea..Follow all your steps again 🙂

    Moreover can you tell me how can I make Opensips listen on SCTP..

    This would be a great help Doddy.

    Thank you in anticipation.

    Best Regards,
    Abhishek

  38. Swetha says:

    Hi Doddy,
    I want to enable XCAP integration between my Opensips server and OpenXcap server.I have a Ubuntu virtualbox can i have both Opensips and OpenXCAP on the same virtual box.Also do you have any documentation on enabling this integration.

    TIA,
    Swetha

  39. manish says:

    dear doddy

    i tried to install all steps ( i need your help badly)

    1. in step 21 sudo nano /etc/init.d/opensips
    change : DAEMON=/usr/sbin/opensips
    RUN_OPENSIPS=no
    to : DAEMON=/usr/local/sbin/opensips
    RUN_OPENSIPS=yes

    2. in step 27 sudo nano /etc/bind9/named.conf /etc/bind9/
    doesnt exist shall i change it in /etc/bind

    in opensips it only shows DAEMON=/usr/sbin/opensips rest is not given shall i add run_opensips=yes;
    2.

  40. Hildemut says:

    This posting about Install OpenSIPS on Debian or Ubuntu doddy’s page helped me explain this subject to my daugther. Thanks 🙂 Hildemut

  41. Srihari says:

    This is fabulous work and simply fantastic article. It helped me a lot for my Research curriculum. I wished to thank, Doddy in person but I couldn’t get his mail id. Once again tons of thanks…

  42. Doddy says:

    Thanks all,,,,
    you can PM me on doddy.widanto@gmail.com.
    have a nice day 😀

  43. durgaprasad says:

    from durgaprasad
    hi
    i am in final year of engineering
    i want to install opensip in ubantu
    i am doing it as my final year project
    please help
    i didn’t got from where to download packages like bison,flex etc and what should be the version.
    tn where to save them while installing
    i am very new to ubantu
    so plz can u give steps in more detail?

    thanx

  44. durgaprasad says:

    thax

  45. u-name says:

    Worked Like Charm: Here are my configurations. I had errors while compiling it with TLS so for the time being I just skipped that part.

    Cheers and thnks

    opensips-1.7.1-tls# lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 11.10
    Release: 11.10
    Codename: oneiric

    • u-name says:

      Just a quick question: After system restart I am unable to start the Opensips and error is as below:

      ERROR: No PID file found (/var/run/opensips/opensips.pid)! OpenSIPS probably not running

      thanks

  46. Sanjay arora says:

    First of all thanks to you that i succesfukky installed opensips on ubuntu 10.10..
    “INFO: Starting OpenSIPS :
    INFO: started (pid: 22014)
    fredo@fredo-desktop:~$ sudo opensipsctl add 1001 1001
    INFO: user ‘1001’ already exists
    “….. Am i write friend the above command are the symbol of Success…

    Now as i am new to sip. Can you guide me what will be next step????

  47. jonny says:

    Hi, I have installed opensips on ubuntu with minimal linux experience. I am tryin to run this command //sbin/opensips –f //etc/opensips/opensips.cfg&
    which returns “command not found”.
    THe same with opensipsctl start, opensips, and other commands like that.

    What am I doing wrong?

  48. hamza says:

    chmod +x/etc/init.d/OpenSIPS command not working,error is operand missing plz help

  49. Choemhoi says:

    Hi, why I did not install the step 8? Thank’s.

  50. MS says:

    Got an error on step #18 – curses.h: No such file or directory

    For Ubuntu 12.04 – needed to do:
    sudo apt-get install libncurses5-dev libncursesw5-dev

  51. Asim Ahmed says:

    I am stuck at step 35
    35. sudo nano /usr/local/etc/opensips/opensips.cfg

    I can open this file but cant find any thing like that mentioned in this step to uncommet or change. File does not contain a single occurance of word “mysql” ? Am I opening a wrong file ?

  52. Asim Ahmed says:

    hi, I managed to work around the problem i posted earlier now I am faced with a new challenge! What credentials to give to any sip enabled client or softphone ? what user name / password / domain shud I give?

  53. venkat says:

    hi sir ,i want know opensips.cfg file.i have basic idea but how the flow is going….plz tel me with eplation.

  54. Good day! This is kind of off topic but I need some help from an established blog.
    Is it hard to set up your own blog? I’m not very techincal but I can figure things out pretty quick. I’m thinking about setting up my own but I’m not sure where to start. Do you have any ideas or suggestions? Thank you

  55. Thanks for any other informative web site. The place else may I am getting
    that type of info written in such a perfect approach?
    I’ve a challenge that I am simply now running on, and I have been at the glance out for such information.

  56. nandini says:

    i have installed opensips in ubuntu 10.04. In exculed modules i have removed mi_xmlrpc.
    but i could not mi_xmlrpc.so file in usr/lib/opensips/modules.
    please help me.

  57. JJ Usher says:

    Hello, i read your blog from time to time and i own a similar one and i was just wondering if you get
    a lot of spam feedback? If so how do you reduce it,
    any plugin or anything you can advise? I get so much lately it’s driving me crazy so any support is very much appreciated.

  58. youtube says:

    This is very interesting, You’re a very skilled blogger. I’ve joined your rss feed and look forward to seeking more of your wonderful post.
    Also, I’ve shared your website in my social networks!

  59. Alecia says:

    This is awesome!

  60. Hassan Wajahat says:

    Hi Doddy,

    I was installing opensips on lubuntu 13.04. and I am stuck @32…..the opensips folder is empty. There is no file named opensipsctlrc present…………..what should I do

    Regards

    • Doddy says:

      Try to reinstall the Opensips, maybe with the new package file.
      The correct installation package should not be leaving the folder without the related file

Leave a reply to Install OpenSIPS on Debian or Ubuntu | Debian-News.net - Your one stop for news about Debian Cancel reply