How to install Opensips 1.6.2 in ubuntu 9.04

2010-04-04
2013-05-09
  • Hi all. Sorry to be a newbie here.
    I am installing for the first time but it notifies the error "ERROR: PID file /var/run/opensips.pid does not exist - OpenSIPS start failed" when I type "opensipsctl start".
    I can't fix it.
    please help me. And sent me opensips 1.6.2 detail installing instruction which instruct step by step.
    (I am vietnamese so I can type some mistakes. Sorry about that)

     
  • Franklin Lee
    Franklin Lee
    2010-04-05

    you may check opensips log to find what happened. it should be /var/log/messages if you do not use others.

     
  • Brian Pocock
    Brian Pocock
    2010-04-05

    You may also want to increase the debuging level in the config file, by default its 3 so change it to 4, that will give you more detailed information.   Here is a link to the installation documentation if it helps: http://opensips.svn.sourceforge.net/viewvc/opensips/trunk/INSTALL   Let us know if there are any errors in the log file

     
  • I am sorry. I did follow your instructions. but i can't. because I don't understand it
    You could instruct me detail by comment line. step by step.
    Thank you very much. I am only a newbie.
    And I did follow document. It's content:

    "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. sudo nano /etc/bind9/db.opensips
    contains :

    ;
    ; 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. sudo nano /etc/bind9/db.18.14.10
    contains : ;
    ; 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 "

    YOU COULD INSTRUCT ME AS ABOVE,PLEASE.
    THANKS

     
  • cut-the-chase
    cut-the-chase
    2011-02-15

    CAT THE CHASE…..Solution for.

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

    #opensipsctl start

    INFO: Starting OpenSIPS :

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

    After installing opensips on centos 5.5 There are several ways to start opensips
        1. type
    # service opensips start
    Starting opensips:                                        
    #
    verify:
    # ps -A |grep opensips
    32504 ?        00:00:00 opensips
    #service opensips stop
    verify:

    2. or type

    # opensipsctl start

    INFO: Starting OpenSIPS :
    INFO: started (pid: 32683)

    Verify
    # ps -A |grep opensips
    32683 ?        00:00:00 opensips
    32685 ?        00:00:00 opensips

    Issue and solutions
    If you get.

    # opensipsctl start
    INFO: Starting OpenSIPS :
    ERROR: PID file /var/run/opensips.pid does not exist - OpenSIPS start failed
    userver1 log]# tail messages
    |
    |Feb 15 13:44:45 <hostname> last message repeated 2 times
    Feb 15 13:44:45  <hostname> /usr/sbin/opensips: ERROR:core:tcp_init: bind(8, 0x8199888, 16) on 127.0.0.1:5060 : Address already in use   ← this is your problem! Simply put opensips is already running on your host.

    stop the service

    #service opensips stop

    start opensipsctl

    #opensipsctl start          -- you should be good.
    ]# opensipsctl start

    INFO: Starting OpenSIPS :
    INFO: started (pid: 32683)

    #opensipsctl start     command again will give you this confirmation.

    root       486   465  0 14:40 ?        00:00:00 /usr/sbin/opensips -P /var/run/opensips.pid
    root       488 31769  0 14:40 pts/2    00:00:00 /bin/sh /usr/sbin/opensipsctl start
    -rw-r-r- 1 root root 4 Feb 15 14:40 /var/run/opensips.pid
    INFO: PID file exists (/var/run/opensips.pid)! OpenSIPS already running?
    #cd /var/run
    #ls  opensips.pid
    opensips.pid

    Done
    best!

     
  • thanks virtualmem,

    I run it succesfull 3 months ago. anyway I appreciate your reply.
    I am doing thesis research opensips. 2 next days I will make a presentation.
    So I have a question about it. Could you please help me answer it?

    assume Asterisk and opensips are installed in 2 servers which the same performance. Why Asterisk just handles about 200 calls but opensips about 300000 calls.? is the algorithm of opensips better than Asterisk.?

    Regards,
    Trung Le.