$Id$

******************************************************
* Note well: ser has not been released yet. Tarballs *
* available at berlios are meant for developers.     *
* Stay tuned -- we will release ser shortly,         *
* including RPM packages and documentation.          *
*                                                    *
* -Jiri, 2002-09-23                                  *
******************************************************



TODO
--we'll probably go for mysql dependancy,
  then INSTALL needs to be completely
  changed


Installation Notes

Supported arhitectures: Linux/i386, Linux/armv4l, FreeBSD/i386, Solaris/sparc64,
Win*/i386 (CYGWIN) - only the core
(for other arhitectures the Makefile must be edited)

There are various configuration options defined in the Makefile.

Requirements:


- gcc >= 2.9x; 3.0.x recommended (it will work with older version but it might
 require some options tweaking for best performance)
- bison or yacc (Berkley yacc)
- flex
- gmake (on Linux this is the standard "make")

OS Notes:

- FreeBSD: make sure gmake, bison & flex are installed
- Solaris: as above; you can use Solaris's yacc instead of bison
- Windows: it works in windows but you must install a recent cygwin version
	(http://www.cygwin.com/) and also install a newer regex library version
	(>=0.12). 
	



Howto:
(NOTE: if make doesn't work try gmake  instead)

- compile with default options:

make   #builds only ser core, equivalent to make ser
make modules

or make all #builds everything

- compile with profiling

make PROFILE=-pg all

-compile debug mode version

make mode=debug all

-compile debug version with profiling

make mode=debug PROFILE=-pg all

-compile only the print module

make modules=modules/print modules

-compile all the modules except textops

make exclude_modules="CVS textops" modules

-compile with the "tm" module statically linked and with profiling

make static_modules=tm PROFILE=-pg all

-compile with gcc-3.0 instead of gcc

make CC=gcc-3.0 all



Make targets:

Clean:

make clean   (clean the modules too)
make proper  (clean also the dependencies)
make distclean (the same as proper)
make mantainer-clean (clean everything, including auto generated files,
 tags, *.dbg a.s.o)

Compile:

make proper
make
(or gmake on non-Linux systems)
make modules 
or make modules exclude_modules="CVS print" etc.

Make tags:

make TAGS

Create a tar.gz with the sources:

make tar

Create a tar.gz with the binary distribution:

make bin

Install(not done yet):

make prefix=/usr/local  install



Quick-Start Installation Guide
----------------------------------------------

This guide give you instructions on how to
set up the SIP Express Router (ser) on your
box quickly. In case the default configuration
does not fly, check documentation at ser site
  http://www.iptel.org/ser
If the documentation does not resolve your 
problem you may try contacting us by E-mail at
  serhelp@iptel.org
 
Note well the default configuration is very simple
in order to be easily installable and provides
minimum features. Particularly, authentication
is disabled, which means anyone can register using
any name with the server. (This is on purpose to
avoid installation dependencies on MySQL which is
needed for storing user credentials.)


A) Quick Start
----------------------------------------------

1) Download an RPM package from our site
	http://www.iptel.org/ser/
2) install the package
	rpm -i <pachage_name>
3) start the server
	/etc/init.d/ser start
4) optionally, watch server's health using the
   serctl utility
	- to do so, first set the environment
	  variable SIP_DOMAIN to your domain 
	  name, e.g., in Bourne shell, call
	    export SIP_DOMAIN="foo.bar"
	- run the serctl utility
	    /usr/sbin/serctl moni
5) Register with the server using your favorite
   SIP User Agent. You may want to look at configuration
   hints for use of iptel.org site at
     http://www.iptel.org/phpBB/viewforum.php?forum=1&8
   For example, users of Windows Messenger need to set
   in Tools->Options->Accounts the foolowing values:
     Sign-in Name: <username>@<your_server_address>
     Advanced->Configure Settings (on)
     Advanced->Server: <your_server_address>
     Connect Using: UDP



B) ser with Persistent Data Storage
----------------------------------------------
The default configuration is very simple and
features many simplifications. In particular,
it does not authenticate users and loses 
User Location database on reboot. To provide
persistency, keep user credentials and remember
users' locations across reboots, ser can be
configured to use MySQL. Before you proceed,
you need to make sure MySQL is installed on
your box.


1) Download an RPM *source* package from our site
	http://www.iptel.org/ser/
2) install the package
	rpm -i <pachage_name>
3) compile the package
4) install the package
5) create MySQL tables
    /usr/sbin/ser_mysql.sh create
6) configure ser to use SQL
    uncomment all lines which are related to 
    authentication:
    - loadmodule "/usr/lib/ser/modules/mysql.so"
    - loadmodule "/usr/lib/ser/modules/auth.so"
    - modparam("usrloc", "db_mode", 2)
    - modparam("auth", "secret", "alsdkhglaksdhfkloiwr")
    - modparam("auth", "calculate_ha1", yes)
    - if (!www_authorize("iptel.org", "subscriber")) {
        www_challenge("iptel.org", "0"); 
        break;
      };
7) restart the server
	/etc/init.d/ser start



C) Troubleshooting
----------------------------------------------

/etc/ser/ser.cfg
/etc/init.d/ser restart
listen
aliases