README.OpenSwitch12
===================

Last updated: 7 Aug 2007


OpenSwitch12 Driver Installation
================================

Prerequisites: it is assumed that before reading this document you
have the OpenSwitch12 card already installed in a system and that you have
a working installation of Linux on that machine.  Some Linux system
administration skills are assumed, with at least sufficient knowledge
to compile and install software, including kernel modules, from source.
It is expected that you have an operational development environment,
including the GNU C and C++ compilers.

The most recent vpb-driver release may be found at:
http://www.voicetronix.com/downloads.htm

The OpenSwitch12 card requires the vtcore driver from this package.

To build and install the library and support files:

$ ./configure && make
$ su
# make install

Still working as the root user, generate the config files:

# ./src/utils/VpbConfigurator

This script will detect the cards you have in the system and ask
questions for anything it is unable to detect.  You will need to know
in advance:

- your country code
  This is the code used for dialling your country from overseas.  For
  example, if you are in Australia it will be 61, if you are in the UK
  it will be 44, if you are in the US it will be 1, and so on.  If you
  don't know it, you can look for it here:
  http://en.wikipedia.org/wiki/List_of_country_calling_codes

VpbConfigurator will write the files /etc/vpb/vpb.conf and
/etc/vpb/vtcore.conf. These files may be modified for user specific
requirements.  See README.VpbConfig for available options.

Load the kernel module:

# modprobe vtopenswitch

You should see some initialisation messages reported to the system log
file (/var/log/messages or /var/log/syslog depending on your distro),
and the module should appear in the output of lsmod:

# lsmod | grep vtopenswitch
vtopenswitch              64564  0
vtcore                    30476  1 vtopenswitch

You are now ready to start developing your CT software, or installing
pre-developed software such as CT Server (available from Voicetronix).


Hardware Configuration
----------------------

The OpenSwitch12 card has 12 ports, divided into Bank A (8 ports), and
Bank B (4 ports).  Each bank can be individually configured as either loop
start (FXO) or station ports (FXS).

Bank	Ports	Configuration	Insert Headers
A	0..7	Loop Start	none
B	8..11	Loop Start	none
A	0..7	Station		JS1, JS2, JS5, JS6, H1-H16 inclusive
B	8..11	Station		JS3, JS4, JS8, JS7, H17-H24 inclusive

A typical configuration is to have Bank A configured for station
ports, and Bank B configured for loop start.  This provides 8 extensions
(station ports) and 4 external lines (loop start ports).

WARNING: - please double check your configuration.  Connecting a station
port to a loop-start phone line may damage the OpenSwitch12 and upset
your Telco.


Failover
--------

When power is removed from the OpenSwitch12 ports 0..3 will automatically
be connected to ports 8..11.  This provides automatic bypass for external
lines to extensions, for example during a power blackout or host PC failure.
Fail over is most useful when the OpenSwitch12 is configured for PBX
applications (e.g. Bank A station/Bank B loop start).

To enable fail over, insert headers H27-H34 inclusive.


Port Wiring
-----------

J1 - ports 0..3  (Bank A)
J2 - ports 4..7  (Bank A)
J3 - ports 8..11 (Bank B)

On each connector standard CAT-5 phone wiring EIA (TIA) 568A is used:

			J1	J2	J3
pair 1: pins 4 & 5	port 0	port 4	port 8
pair 2: pins 3 & 6	port 1	port 5	port 9
pair 3: pins 1 & 2	port 2	port 6	port 10
pair 4: pins 7 & 8	port 3	port 7	port 11
