FAQ
Created 1/2/02
Voicetronix Voice Processing Board (VPB) Driver Software
www.voicetronix.com.au

CONTENTS
--------

1) Compiling Problems under Linux
2) Detecting Hangup with the OpenLine4
3) Application using Driver Bombs out with an Exception
4) Memory Test fails on start up (Plug and Play BIOS) 
5) How do I detect (Busy/Ringback/Hangup/etc) tone?

QUESTIONS
---------

1) Compiling Problems under Linux
---------------------------------

Problem: 

- the make process bombs when compiling vpb.c, the small kernel mode
component in the driver.
- you get several "unresolved symbol" errors when you "insmod vpb.o".

Solution:

- this problem occurs because of the variety of different Linux kernels and
  distros.
- make sure your kernel sources are installed.
- make sure your kernel sources are the same version as your kernel.
- change the -I path of the src/Makefile line (bottom of file):
	cc -O6 -m486 -c vpb.c -I/usr/src/linux/include -Wall
  to point to your kernel sources.
- Set up a symbolic link to yout sources, for example:
  ln -s /usr/src/linux-2.4 /usr/src/linux

- try modifying  src/vpb.c as follows:
	/*#ifdef MODVERSIONS*/
	#include <linux/modversions.h>
	#include <linux/module.h> 
	/*#endif*/

2) Detecting Hangup with the OpenLine4
--------------------------------------

Problem:

- you need the card to detect when the far-end caller hangs up.

Solutions:

- Program the tone detector to detect the hangup tone your PBX/PSTN generates
  when the far-ends caller hangs ups.  See the doc directory for lots of
  information on programming tones.

- Some telephone systems do not generate a hangup tone, there is only 
  silence on the line.  In this case use a timer to hangup the port after a
  the line has been inactive for a certain amount of time.  This can be
  implemented using the VPB_GRUNT event to reset a vpb_timer.  When speech
  activity ceases on the line, the timer will no longer be reset, and will
  "fire", which can be used to hang up the port.  There is an example of
  how to implement a silence detector in unittest/silence.cpp.

- If in North America, your line may generate a "loop drop" signal, in which 
  case the card will generate a "loop drop event", VPB_DROP.

3) Application using Driver Bombs out with an Exception
-------------------------------------------------------

Problem:

The default run-time error handling code raises an exception if an error 
occurs.  For example you get something like this (caused by trying to play
a wave file that doesnt exist):

exception caught: VPBAPI_WAVE_CANT_OPEN_FILE, file: wave.cpp line:325        

Solution:

The default error handling mode is VPB_DEVELOPMENT. You can change the error 
handling mode (using vpb_seterrormode) to either:

- VPB_ERROR_CODE: in this case the exception will be caught internally
by the driver, and converted to an integer that is returned by each vpb_xxxx
function.  The return codes are defined in vpberr.h.

or:

- VPB_EXCEPTION.  In this case a well defined exception object is thrown, as
defined in vpbapi.h "error handling" section.  This exception object includes 
a text string describing the error.  

VPB_DEVELOPMENT mode is useful for stand-alone, command line test
programs.  I would definately avoid this when using the vpb api inside
another app.  The first call u make to the VPB api should be to change
the error handling mode to something more benign.

See the doc directory for more info - there is a section on error handling.  

BTW, a "wobbly" in Australian slang is a tantrum, e.g. when a 2 year old
child gets upset we say they are "throwing a wobbly".  Not sure if this
is just a .au term.  So I just couldnt help myself when I needed to
think of an exception class that was "thrown".  I think my daughter was
also 2 at the time :-)

4) Memory Test fails on start up (Plug and Play BIOS) 
-----------------------------------------------------

Problem:

- Your Voicetronix card bombs out when you start an application such
  as unittest/echo with a "DSP memory test failed" error.

Solution:

- reboot your PC, and enter the CMOS BIOS setup menu
- turn off the "plug and play" option in your BIOS
- reboot and try the Voicetronix hardware again

5) How do I detect (Busy/Ringback/Hangup/etc) tones?
----------------------------------------------------

See the documentattion in the doc directory of the driver for lots
of information on programming teh tone detector.  There is also
an automated tone training utility included in the driver.
 

