Help with install.

2010-08-22
2013-05-09
  • turalo turalo
    turalo turalo
    2010-08-22

    Hi.

    I'm a newbie in opensips world, I have used asterisk before. now I want to combine asterisk and opensips.
    I have installed latest Debian on a p4 pc. I folowed install instructions from the book :
    Building Telephony Systems
    with OpenSIPS 1.6.

    but somehow I get different directory sturcture, when I finish the install procces, the open sips works, but all files are not on locations which is told in the book, that means I will get errors in future when installing other extra's.
    Here the instructions which I followed :

    Step 1: Install the dependencies.
    apt-get install gcc bison flex make openssl libmysqlclient-dev
    libradiusclient-ng2 libradiusclient-ng-dev mysql-server libxmlrpc-c3-dev
    The MySQL server is not really a dependency, but we will install it at
    this moment to make things easier.
    Step 2: Download the source packages and decompress them. (Replace x with
    the current version.) There are two packages—tls and no-tls. The tls package
    contains the tls directory and some changes in the core to support encryption
    for the signaling.
    cd /usr/src
    wget http://opensips.org/pub/opensips/1.6.x/src/opensips-1.6.x-tls_src.
    tar.gz
    tar -xzvf opensips-1.6.x-tls_src.tar.gz
    Step 3: Compile and install the core and the modules. Include the db_mysql and
    aaa_radius modules.
    cd opensips-1.6.x.tls
    make prefix=/ all include_modules="db_mysql aaa_radius"
    make prefix=/ install include_modules="db_mysql aaa_radius"
    Step 4: Make the required adjustments
    mkdir /var/run/opensips
    Step 1: Download the dependencies.
    apt-get install libdbi-perl libdbd-mysql-perl libfrontier-rpc-perl
    libterm-readline-gnu-perl
    Step 2: Try running the console
    osipsconsole
    In the console prompt, try using the help and quit commands.
    In order to run OpenSIPS at the Linux boot, perform the following steps:
    Step 1: Include OpenSIPS in the Linux boot
    cd /usr/src/opensips-1.6.x-tls/packaging/debian
    cp opensips.default /etc/default/opensips
    cp opensips.init /etc/init.d/opensips
    update-rc.d opensips defaults 99
    Step 2: Edit the /etc/opensips/opensips.cfg and remove the fork=no line (even
    if it was with C-style remarks). The init script looks for the instruction fork=no,
    even if commented.
    Step 3: Make sure that the opensips.init script has the necessary permissions.
    cd /etc/init.d
    chmod 755 opensips
    Step 4: Edit /etc/default/opensips, and change the memory parameter to 128 MB
    and RUN_OPENSIPS to yes.
    Step 5: Edit the init script to make sure that the daemon is pointing to the
    correct directory.
    vi /etc/init.d/opensips
    The file before making changes:
    DAEMON=/usr/sbin/opensips
    The file after making changes:
    DAEMON=/sbin/opensips
    Step 6: Restart the computer to see if OpenSIPS starts. Confirm this using:
    ps-ef |grep opensips
    Configuration files (etc/opensips)
    These are the files copied to this directory. The files include the RADIUS dictionary to
    be used for OpenSIPS, the main configuration file opensips.cfg, the opensipsctl
    resource file, opensipsctlrc, and the osipsconsole resource file, osipconsolerc.
    opensips-1:/etc/opensips# ls -l
    total 20
    -rw-r-r- 1 root staff 1559 2009-10-09 16:59 dictionary.opensips
    -rw-r-r- 1 root staff 1559 2009-10-09 17:04 dictionary.opensips.
    sample
    -rw----- 1 root staff 12437 2009-10-09 18:34 opensips.cfg
    -rw-r-r- 1 root staff 3661 2009-08-24 11:27 opensipsctlrc
    -rw-r-r- 1 root staff 2878 2009-05-19 14:02 osipsconsolerc

    So while installing I had some errors. :

    make: Entering directory `/usr/src/opensips-1.6.3-tls/modules/aaa_radius'
    make: Leaving directory `/usr/src/opensips-1.6.3-tls/modules/aaa_radius'
    make: Entering directory `/usr/src/opensips-1.6.3-tls/modules/aaa_radius'
    Compiling aaa_radius.c
    gcc -fPIC -DPIC -g -O9 -funroll-loops -Wcast-align -Wall -minline-all-stringops -falign-loops -ftree-vectorize -mtune=prescott -Wold-style-definition -Wmissing-field-initializers -Wredundant-decls -DMOD_NAME='"aaa_radius"'    -DNAME='"opensips"' -DVERSION='"1.6.3-notls"' -DARCH='"i386"' -DOS='"linux"' -DCOMPILER='"gcc 4.3.2"' -D__CPU_i386 -D__OS_linux -D__SMP_yes -DCFG_DIR='"//etc/opensips/"' -DPKG_MALLOC -DSHM_MEM  -DSHM_MMAP -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DSTATISTICS -DCHANGEABLE_DEBUG_LEVEL -DF_MALLOC  -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024  -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_EPOLL -DHAVE_SIGIO_RT -DHAVE_SELECT -I/usr/local/include -c aaa_radius.c -o aaa_radius.o
    aaa_radius.c:37:30: error: radiusclient-ng.h: No such file or directory
    In file included from aaa_radius.c:46:
    rad.h:50: error: expected ‘)’ before ‘*’ token
    aaa_radius.c:66: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    aaa_radius.c:67: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    aaa_radius.c:255: error: expected declaration specifiers or ‘…’ before ‘VALUE_PAIR’
    aaa_radius.c: In function ‘make_send_message’:
    aaa_radius.c:267: warning: implicit declaration of function ‘rc_avpair_add’
    aaa_radius.c:267: error: ‘rh’ undeclared (first use in this function)
    aaa_radius.c:267: error: (Each undeclared identifier is reported only once
    aaa_radius.c:267: error: for each function it appears in.)
    aaa_radius.c:274: warning: implicit declaration of function ‘rc_dict_getattr’
    aaa_radius.c:274: error: invalid type argument of ‘->’ (have ‘int’)
    aaa_radius.c:274: error: ‘PW_TYPE_IPADDR’ undeclared (first use in this function)
    aaa_radius.c:275: warning: implicit declaration of function ‘rc_get_ipaddr’
    aaa_radius.c: In function ‘send_auth_func’:
    aaa_radius.c:296: error: ‘VALUE_PAIR’ undeclared (first use in this function)
    aaa_radius.c:296: error: lvalue required as left operand of assignment
    aaa_radius.c:296: warning: left-hand operand of comma expression has no effect
    aaa_radius.c:296: error: ‘vp’ undeclared (first use in this function)
    aaa_radius.c:296: warning: left-hand operand of comma expression has no effect
    aaa_radius.c:298: error: ‘rh’ undeclared (first use in this function)
    aaa_radius.c:326: error: too many arguments to function ‘make_send_message’
    aaa_radius.c:331: warning: implicit declaration of function ‘rc_auth’
    aaa_radius.c:340: warning: implicit declaration of function ‘rc_avpair_get’
    aaa_radius.c:342: error: ‘PW_TYPE_INTEGER’ undeclared (first use in this function)
    aaa_radius.c:350: error: ‘PW_TYPE_STRING’ undeclared (first use in this function)
    aaa_radius.c:368: error: ‘attr’ undeclared (first use in this function)
    aaa_radius.c:370: warning: implicit declaration of function ‘extract_avp’
    aaa_radius.c:372: warning: the address of ‘send’ will always evaluate as ‘true’
    aaa_radius.c:372: warning: implicit declaration of function ‘rc_avpair_free’
    aaa_radius.c:373: warning: the address of ‘recv’ will always evaluate as ‘true’
    aaa_radius.c:380: warning: the address of ‘send’ will always evaluate as ‘true’
    aaa_radius.c:381: warning: the address of ‘recv’ will always evaluate as ‘true’
    aaa_radius.c: In function ‘send_auth_fixup’:
    aaa_radius.c:390: error: ‘rh’ undeclared (first use in this function)
    aaa_radius.c: In function ‘send_acct_func’:
    aaa_radius.c:414: error: ‘VALUE_PAIR’ undeclared (first use in this function)
    aaa_radius.c:416: error: ‘rh’ undeclared (first use in this function)
    aaa_radius.c:436: error: too many arguments to function ‘make_send_message’
    aaa_radius.c:441: warning: implicit declaration of function ‘rc_acct’
    aaa_radius.c:441: error: ‘OK_RC’ undeclared (first use in this function)
    aaa_radius.c:442: warning: the address of ‘send’ will always evaluate as ‘true’
    aaa_radius.c: In function ‘send_acct_fixup’:
    aaa_radius.c:461: error: ‘rh’ undeclared (first use in this function)
    aaa_radius.c: In function ‘init_radius_handle’:
    aaa_radius.c:481: error: ‘DICT_ATTR’ undeclared (first use in this function)
    aaa_radius.c:481: error: ‘da’ undeclared (first use in this function)
    aaa_radius.c:491: error: ‘rh’ undeclared (first use in this function)
    aaa_radius.c:491: warning: implicit declaration of function ‘rc_read_config’
    aaa_radius.c:496: warning: implicit declaration of function ‘rc_read_dictionary’
    aaa_radius.c:496: warning: implicit declaration of function ‘rc_conf_str’
    aaa_radius.c:501: error: ‘attr’ undeclared (first use in this function)
    aaa_radius.c:501: warning: implicit declaration of function ‘rc_dict_findattr’
    make: ***  Error 1
    make: Leaving directory `/usr/src/opensips-1.6.3-tls/modules/aaa_radius'
    make: ***  Error 2

    this are the only errors. all other things were succesful.

    please help me solving this.
    or maybe is there a better 100% working isntall manual.

    thanks in advance.

     
  • turalo turalo
    turalo turalo
    2010-08-28

    Thanks for your reply I found this same info on another forum, but at that time I was far away instaling one older version which worked better.

    thanks alot anyway.