2. Installation and running

Presence modules use some dynamic libraries distributed with SER and the compilation procedure and running is a bit more difficult than usual. For detailed description of libraries see their separate documentation (stored in lib/doc subdirectory of main SER directory).

2.1. Dependencies

Presence module dependecies may be found in sections PA module dependencies and RLS module dependencies. These modules depend on common libraries which have their own dependencies as mentioned below.

2.1.1. libcds dependencies

This library depends only on standard C libraries and needs no other external libraries.

2.1.2. libxcap dependencies

  • libcds (distributed with SER)

  • libxml2 (external library for parsing XML documents)

  • libcurl3 (external library for HTTP operations, used only in nonSER version!)

2.1.3. libpresence dependencies

  • libcds (distributed with SER)

2.2. Installation from CVS

There is an example of steps which need to be done while installing SER with shared libraries into directory /base/ser/directory (if no directory specified - no prefix parameter given - default value is used: /usr/local/)

  1. Download current SER sources:

    cvs -d :pserver:anonymous@cvs.berlios.de:/cvsroot/ser checkout sip_router

  2. Download very useful ser_ctl utility (not necessary, but it is handy for adding data into database, running XML-RPC functions etc):

    cvs -d :pserver:anonymous@cvs.berlios.de:/cvsroot/ser checkout serctl

  3. Compile and install SER with presence modules. Common libraries should be compiled automaticaly - it may fail in the case of unsatisfied library dependencies. You need to install all external libraries introduced in Section 2.1, “Dependencies”

    cd sip_router

    make install group_include="standard,presence,standard-dep" prefix=/base/ser/directory

2.3. Presence snapshots

In past there were published “presence snapshots” with stable and tested code and up to date documentation. This will change - tested and documented stable features will be probably imported into stable SER branch (Ottendorf) and unstable ones will remain in CVS head.

2.4. Running SER

Linker used for dynamic linking must know, where to find these libraries. This may be done by setting LD_LIBRARY_PATH before startup.

export LD_LIBRARY_PATH=/base/ser/directory/lib/ser

/base/ser/directory/sbin/ser -f /base/ser/directory/etc/ser/ser.cfg

Warning

If you want to run SER under sudo like “sudo /base/ser/directory/sbin/ser -f /base/ser/directory/etc/ser/ser.cfg” it need not work - it is possible that LD_LIBRARY_PATH will not be propagated in this case!

2.5. Database initialization

Warning

This paragraph can be out-of-dated by changes in DB init scripts or in ser_ctl. It has only informative value!

It is very handy to use SER together with database - at least domains and users with attributes can be stored there. First must be database created - there are scripts to do this in SER's source tree in directory scripts; for example "scripts/mysql/ser_mysql.sh create" will create the database for MySQL.

Note

Later MySQL versions can complain with current script, if so, you can try to remove qotes around $PW in script to get it into work.

After database creation you can add data using ser_ctl utility:

  • add domain:

    ser_domain add test test-domain.com

  • add user “parf” with password “parf”:

    ser_user add parf

    ser_uri add parf parf@test-domain.com

    ser_cred add parf parf test test-domain.com parf

Note

Running ser_xxx without arguments shows help.

You can specify database URI used by ser_ctl; for example you can use “postgres://...” instead of default “mysql://...” etc.