Copyright (c) 1999-2001 by Open Source Telecom Corporation.
Verbatim copying and distribution of this entire article is permitted
in any medium, provided this notice is preserved.

INSTALL - Instructions for building and installing Bayonne from source

HISTORY 
Updated for: Bayonne-1.1.1 by: dr_kludge_@_users_sourceforge_net
                               (Only the first underbar counts.)
Updated for: Bayonne-0.6.4 by: rsb@ostel.com 
Created By: David Sugar

Please help us maintain an up-to-date INSTALL file by sending updates,
notes, and suggestions to bayonne-devel@lists.sourceforge.net Thanks!

For The Impatient
=================

There are a lot of dependencies, so if you are patient, it is far
better to skip this section and read the rest of this file instead.
If you absolutely do not have time to read this file, then the
following might work for you:

Make sure you have a machine with perl, c++, and libxml (and Lis streams if
you are using Dialogic stuff).  Then get the latest source for:
CommonC++, ccaudio, ccscript, ccrtp, and Bayonne.

rm -rf /usr/local/lib/libcc*
rm -rf /usr/local/include/cc++
export PATH=$PATH:/usr/local/bin
export PATH=$PATH:/usr/local/sbin
cd CommonC++-<tab>
./configure && make install
cd ../ccaudio-<tab>
./configure && make install
cd ../ccscript-<tab>
./configure && make install
cd ../ccrtp-<tab>
./configure && make install
ldconfig
cd ../Bayonne-<tab>
./configure --without-perl && make install
bayonne --trace

Before You Start 
================

	This file contains up-to-date instructions for Building the
current version of Bayonne.  You must read at least the following
three sections: Bayonne Prerequisites, Building Bayonne, and
Configuring and Testing Bayonne.  You may want to read the BAYONNE.FAQ
or the manual in the /doc directory if you run into trouble with these
instructions.  Detailed information on configuring and hacking Bayonne
can be found in the manual.  If you don't get what you need out of
those, you will want to contact bayonne-devel@lists.sourceforge.net to
get help.

Bayonne Prerequisites
=====================

	Before building Bayonne, make sure you have the following basic
necessities installed and working on your development system:

	C++ build environment 
	Perl interpreter

	In order to build Bayonne from tarballs, you must download,
compile, and install at least the following modules in this order:

   	libxml:
	ftp://ftp.gnome.org/pub/gnome/sources/libxml2/2.4/libxml2-2.4.30.tar.gz
	CommonC++:
        ftp://ftp.gnu.org/gnu/commonc++/commoncpp2-1.0.9.tar.gz
	ccaudio:
        ftp://ftp.gnu.org/gnu/ccaudio/ccaudio-1.0.6.tar.gz
	ccscript:
        ftp://ftp.gnu.org/gnu/ccscript/ccscript-2.5.0.tar.gz
	Bayonne:
        ftp://ftp.gnu.org/gnu/bayonne/bayonne-1.1.11.tar.gz

	Before you can actually do anything with Bayonne, you will
need a driver for a supported telephony device installed and tested.
The supported telephony devices as of this writing are:

	Phonedev: any card that uses the /dev/phone interface, i.e. quicknet 
	Pika: www.pika.ca 
	Dialogic: www.dialogic.com
	Voicetronix: www.voicetronix.com.au

	There are several cards and protocol stacks with incomplete
	support as well:

	EECS: www.eecs-com.net 
	Aculab: www.aculab.com 
	Zapata: www.bsdtelephony.com.mx 
	Voice Modems: any AT+V compatible modem 
	OpenH323: www.openh323.org 
	More being added all the time...

	Sometimes configuring and testing a device can be tricky.
This is not our fault.  Any tips or instructions we have on
configuring and testing telephony devices we will put in the manual in
the /doc subdirectory.

Building Bayonne 
================

	Once you have the pre-requisites out of the way, you MUST consider the
configure options as described below.

   	By default, Bayonne will attempt to build and install all of
the telephony servers supported in the distribution.  Since most often
only a specific set of servers is required to support the vendor
telephony hardware you have available, there are ways to select and
remove vendor specific server implementations through configure.  The
advantage of doing this is a shorter compile time and the elimination
of distractions from errors in building uneeded API trees.

	The "--without-pika" option removes all Pika Monte Carlo related
        modules and libraries from the build tree.

        The "--without-phonedev" option removes all GNU/Linux
        /dev/phone support.

        If you do not have embedded perl installed, you must use
        "--without-perl".
 
        If you do not have the Voicetronix driver installed, you must use
        "--without-vpb".


        A typical configuration command if you just have a quicknet card: 
./configure --without-vpb --without-perl --without-pika --without-dialogic

	After Bayonne configures, just run "make" to compile the
system.

Configuring and Testing Bayonne
===============================

Please NOTE: the ./bayonne --test is performed only once after the
make step in the bayonne untar directory.  The --test option is used to
make sure you are on track before you perform the make install step.
After make install you will want to use

       /usr/share/sbin/bayonne --trace playrec

to test changes to a script or for additional bayonne testing.  Please
finish configuring the /etc/bayonne.conf before attempting to use the
--trace option.

	After you have compiled bayonne you may immediately test bayonne
from the "build" directory.  Simply "cd server" and execute
"./bayonne --test".  Bayonne will immediately load a bunch of DSO
modules and perform a complete 3 stage regression test on itself.
This should take less than 30 seconds, and should complete with a
message indicating all tests have "passed".

	Bayonne "--test" mode will select the default telephony plugin
to use based on the current API's found when Bayonne was
"./configure"ed.  For instance, if MonteCarlo is found, then it
bayonne will select the Pika MonteCarlo in "--test" mode.

	You configure Bayonne for actual use with "make install".  If you
have multiple telephony api's installed on your machine, you will need to
specify which plugin driver to select in /etc/bayonne.conf.  In the
[plugins] section simply put a line such as "driver = phonedev" or "driver =
pika".

	You can do more things with "--test" though.  Enter "./bayonne --test
playrec".  This will bring up a Bayonne server with the trace DSO
loaded that runs from the "build" directory.  Call your telephony
device, and it will answer and run the "playrec" script.

	Once you can call in and use playrec, you are ready to install
and/or develop applications.  See the Bayonne Manual in the  /doc
directory for more information on this.  Have Fun!

