                                                           1

                      The Best choice:

                       Talking Access

          for  FoxPro, MS Access or Visual Basic

                           Overview

  The   VOX  Development  Package  is  used  for  developing
interactive  voice  response (IVR)  applications  in  FoxPro
utilizing Dialogic voice board.

             Hardware and Software Requirements

  In  order  to  develop IVR application you must  have  the
following software and hardware products installed  on  your
computer:

- FoxPro for Windows
- Dialogic board and drivers.
- The Talking Access


                     Why Talking Access?

  The  process of developing IVR applications has two  major
aspects:

  (a)  The first one is related to the ability of the system
to  work  simultaneously over several telephone lines   This
means  that  a multi-line voice application must  handle  in
parallel the algorithms for several lines switching  between
the  channels  according to the registered events.  Even  in
multitasking environment it is not a good idea  to  run  one
application many times, each one handling a single line.

    (b)  The  second  one is about the ability  of  the  IVR
application   to  access  the  databases  for  storing   and
retrieving information.

   Most  of  the existing IVR development systems solve  the
multitasking problem however to the  some extent ignore  the
database access. Talking Access does not put limits on using
all FoxPro capabilities.

  The other systems simply provide an interface to the voice
board driver and expect from you to write event driven state
machine in FoxPro. Talking Access also provide interface  to
the  voice  board driver and much more. You can specify  the
algorithms   for   each   telephone  line   separately   and
sequentially  ignoring  the  multitasking  issues  that  are
handled  automatically by the Talking Access!  At  the  same
time,  you  are  not limited in any way in  using  the  full
FoxPro capabilities.
  The  Talking  Access gives you a simple set of statements,
that are used to build VOICE programs. Every time, when  the
VOX  statements and macros are not power enough  to  perform
wanted  action Talking Access can execute a UDF  written  in
FoxPro  or  Access  and  uses  it's  return  code  for  it's
purposes.



                      How does it works?

  Every  VOX  application is built up  of  several  separate
groups of modules:

  (a)  The TA.EXE moule runs all VOX programs simultaneously
in  several  channels.  The TA.INI  file  that  TA.EXE  uses
describes  DDE  servers, VOX programs,  program  to  channel
assignment and some  board parameters.

  (b)  The  TADLL.DLL library contains a set  of  functions.
Those are functions for checking various voice-board or line
parameters like: "is the phone line connected?", "the number
of  lines,  supported  by the board",  "the  number  of  the
current  program  channel".  They  are  available  in   many
development  systems  and  also  in  FoxPro  via   TADLL.FLL
library.
  (c)  The  FoxPro  or Access DDE server(s). This  server(s)
will   receive  DDE  messages  from  TA.EXE  and  pass  back
calculated values.
  (e)  The  set  of FoxPro UDF functions, that  have  to  be
called from within the VOX program
  (f)  The  set  of  VOX  programs. They  describe  possible
scenarios  for phone sessions. When some action can  not  be
performed  using VOX statements ( like for example  Database
search ) the DDE request is generated. This in fact starts a
FoxPro  UDF.  This UDF receives a string parameter  and  can
return  a result to the VOX program. The result may be  used
in  VOX  program as a statement parameter. For example,  you
may write in VOX program the following line:

  PLAYFILE  @FoxServ|Macro|PFName(&CCN.,&DGS.)

  If  the current phone channel is 2 and the last touch tone
digit,  is  3 we can replace the macros &ccn. and &dgs  with
their actual values, so the statement becomes

  PLAYFILE  $FoxServ|MyMacro|PFName(2,3)

  Then the string "PFName(2,3)" is passed to your FoxPro DDE
server  ( server FoxServ topic Macro ), so FoxPro Expression
PFNAME(2,3) is calculated. The returned value is issued from
PLAYFILE as a file name to be played.



              What else with 'Talking Access' ?

  Can I run 1 program simultaneously on many channels?           Yes!
  Can I run 2 programs simultaneously on one channel?            Yes!
  Can I run non-voice programs in this multitasking environment? Yes!
  Can I handle "Line Break" and GTD tone events ?                Yes!
  Can I handle ANY board event?                                  Yes!
  Can I wait for a specific event in my VOX program?             Yes!
  Even if it is not a "voice" event, but for example time check? Yes!
  Can I synchronize programs that work in different channels?    Yes!
  Can I send faxes from several fax boards?                      Yes!
  Can I change CPB and DCB parameters?                           Yes!
  Can I have more than one DDE server?                           Yes!
  Can I run Voice application simultaneously with an other FoxPro
  application?                                                   Yes!
  Can I run Voice application simultaneously with an other Windows
  application?                                                   Yes!

  Is it necessary to know how a voice board works?               No!
  Is it necessary to know how to write event driven programs?    No!
  Is it necessary to know how to write state machines?           No!







                            Sample Example

* Talking Access code:
****************************************
* Source :  SAMPLE.SRC
* Compiled: SAMPLE.VEX
****************************************
               BEGIN     BRK            * Define start point
BYE:           PLAYFILE  BYE.VOX        * Play good-bye message
BRK:           ONHOOK                   * Close phone line

               WAITRINGS                * Wait for rings
               OFFHOOK                  * Connect phone line
               ONBREAK   BRK            * When line break, Goto BRK
               EVALUATE  FOXSERV|MACRO|INIT(&CCN.)|NO       * FoxPro
init code
               PLAYFILE  HELLO.VOX      * Play greeting message

REPEAT:        PLAYFILE  ENTERID.VOX    * Enter ID number prompt
               GETDIGITS      8              * Get UserId number
               GOTO           @FOXSERV|MACRO|VALID()|NO     * FoxPro
Validation code

UNVID:         PLAYFILE  INVID.VOX      * That wasn't a valid ID code
               GOTO      REPEAT

MNU:           PLAYFILE  MENU.VOX       * Play choice menu
               GETDIGITS 1              * Wait for a single touch-tone
digit
               IF        &TMO.          * If digit was not received
                    GOTO BYE            * Branch to label BYE
                    GOTO      &DGS.          * Do case by digit

* Choice 1:  Say number using id number
1:             INXPLAYN  @FOXSERV|MACRO|GETVAL()|NO    * Play as
number field sum
               GOTO      MNU

* Choice 2:  Replace number
2:             PLAYFILE  ENTERVAL.VOX   * Enter new value
               GETDIGITS 8
               EVALUATE  FOXSERV|MACRO|NEWVAL(&dgs.)        * Replace
value
               GOTO      MNU

* Choice 0: Exit
0:             GOTO           BYE

* Any other choice:
NOLABEL:      PLAYFILE   INVALID.VOX    * That wasn't a valid choice
                    GOTO      NNU

Corresponding file TA.INI

**** DDE Server Definition ***
server = FOXSERV MACRO EXECUTE -1

**** VEX Program definition ***
program 1 = E:\FPW26\vox\SAMPLE.SRC

 *** Board parameter definition ***
board = 5,1                        * irq 5, rings 1

  *** Program assignment ***
 channel 1 = 1    *  channel 1, program 1
 channel 2 = 1    *  channel 2, program 1
 channel 3 = 1    *  channel 2, program 1
 channel 4 = 1    *  channel 2, program 1

 FoxPro  code:

*********************************************************************
*   ========= DDE  SERVER =======
*       DDEServ - Simple FoxPro DDE server      for Talking
Access/Foxpro applications.
*  Topic:
*  MACRO    => (Execute)  do MACRO expression
*
*********************************************************************
PUBLIC SVR_NAME
SVR_NAME =     "FOXSERV"                     && The name of DDE server
set library to "TADLL.DLL"
ON ERROR DO ERH

= DDESetService(SVR_NAME, "define")               && The Action
define
= DDESetService(SVR_NAME, "request", .T.)              && The Action
request
= DDESetService(SVR_NAME, "poke", .T.)            && The Action Poke
= DDESetService(SVR_NAME, "execute", .T.)              && The Action
Execute
= DDESetService(SVR_NAME, "advise", .F.)               && The action
advise is not used

= DDESetTopic(SVR_NAME, "MACRO",  "cbMACRO") && The topic MACRO calls
UDF cbMacro
set procedure to E:\FPW26\VOX48\DDESERV.PRG
DO MAININIT                                  && Init Callback
functions
RETURN
*********************************************************************
*   ========= DDE  SERVER Macro execute =======
* FileName: DDESERV.PRG
*********************************************************************
PROCEDURE cbMacro
PARAMETERS iChannel, sAction, sItem, sData, sFormat, iStatus
PRIVATE  bResult
PRIVATE I
= DDEEnabled(.F.)             && we don't want interruptions
bResult = .T.                 && The bRresul is passed to DDE servise,
not to VOICE program

DO CASE
      CASE sAction = "INITIATE"    && Called onse when TA.EXE is
started
                FOR i =1 to 4
                         =DTMFRWD(i,asc("#"),30,30,8)       && Set
default GETDIGIT parameters
                      =FILERWD(i,asc("#"),30,30)       && Set default
PlayFile parameters
                         =PLAYPATH(i,"VOXFILES\")      && Set deflault
path for speech files
                 NEXT

      CASE sAction = "REQUEST"     && Wil not be used in this example,
because EXECUTE service was
                         && specified in TA.INI
                 =DDEPoke(iChannel,sItem,"Ok")

       CASE sAction = "POKE"       && Wil not be used in this example,
because EXECUTE service was
                         && specified in TA.INI
                 &sData

       CASE sAction = "EXECUTE"
                 ans = &sData      && Evaluate expression, that comes
in sData
                 =SETPARAMSR(SVR_NAME,"MACRO",ans)     && pass
returned

CASE sAction = "TERMINATE"    && Called once when TA.EXE is terminated
                 =KILLSERVER()
                 wait window  "The server was stopped because TA.EXE
has been terminated"
                 cancel
OTHERWISE                && Invalid service
    wait window "Wrong service: "+sAction
    bResult = .F.
ENDCASE
= DDEEnabled(.T.)
RETURN bResult

PROCEDURE KILLSERVER
       =DDESetService(SVR_NAME,"release")         && This kills DDE
Server

DO ENDPROG

PROCEDURE ERH
 = DDEEnabled(.T.)                      && we don't want interruptions
**********************************************************************
*           ********** CALLBACK UDF's ***********
**********************************************************************
* NAME:       INIT
* ACTION:     Initialization for phone session
* PARAMETER:  Channel number
* RETURNS:    Nothing, that is "" in Talking Access
************************************************
FINCTION MAININIT             && Initialisation onse at the start
PRIVATE i
i = CHNCOUNT()           && Number of active channels
     PUBLIC  ARRAY  RNNUM( i )
     PUBLIC   ARRAY RETRNUM( i )
     USE  MYBASE  SHARED in 0
RETURN

************************************************
FUNCTION INIT            && Initializations at the phone session
beginning
 PARAMETER chan
  RNNUM(chan)   = 0                && Clear current record number
  RETRNUM(chan) = 0           && No retries
RETURN ""
************************************************
* NAME:      VALID
* ACTION:    Validate ID number & save RECNO()
* PARAMETER: digits ( string )
* RETURNS:   Talking Access label ( up to 3 retries )
************************************************
FUNCTION VALID
 PRIVATE digits, chan
 PRIVATE ARRAY A(1)
 digits = val(DGS())
 chan = CCN()
 A(1) = 0
 SELECT RECNO() FROM MYBASE WHERE NUMBER = digits INTO ARRAY A

 if A(1) != 0                 && If valid record found
RNNUM(chan) = A(1)
RETURN "MNU"             && This branches VOX pgm to label MNU
 else                         && Invalid: count retry times
RETRNUM(chan) = RETRNUM(chan)+1
if RETRNUM(chan) > 3
               RETURN "BYE"
      else
               RETURN "INVID"
     endif
  endif

************************************************
* NAME:        GETVAL
* ACTION:      Get Value for selected RECNO()
* PARAMETER:   No
* Returns:     Value as string
************************************************
FUNCTION GETVAL
 PRIVATE  chan, cAlias, nRecn, rc
  chan = GETCCN(")
  if RNNUM(chan) == 0                   && unexpected error, VOX
     wait window "Error #1 " nowait     && program must not call
     return ""                          && GETVAL() in this case
  endif
 cAlias = alias()                       && Save Environment
 select MYBASE                          && in case concurrent mode
 nRecn = RECNO()
 goto RNNUM(ccn())
 rc = MYBASE.Value
 goto nRecn                             && Restore all
 if .not. empty(cAlias)
     select &cAlias
 endif
 RETURN rc
************************************************
* NAME:        NEWVAL
* ACTION:      Set new Value for selected RECNO()
* PARAMETER:   New value ( as string! )
* Returns:     No
************************************************
FUNCTION NEWVAL
 PARAMETER nValue
 PRIVATE  chan, cAlias, nRecn
  chan = CCN()
  if RNNUM(chan) == 0                   && unexpected error, VOX
     wait window "Error #1 " nowait     && program must not call
     return ""                          && GETVAL() in this case
  endif
 cAlias = alias()                       && Save Environment
 select MYBASE                          && in case concurrent mode
 nRecn = RECNO()
 goto RNNUM(ccn())
 replace MYBASE.Value with VAL(nValue)
 goto nRecn                             && Restore all
 if .not. empty(cAlias)
     select &cAlias
 endif
 RETURN ""

============================================================================


                   P R I C E   L I S T





         MAJOR CHANGE IN THE UIS PRICE STRUCTURE!


Every purchase of the developer's license totaling
$1000.00 for Talking Xbase and $1500.00 for Talking
Access will give you the maximum license for 32 voice
lines and 4 fax lines.


                      ROYALTY  FREE!


1. Two lines Talking Xbase developer's toolkit,
   including one fax line - Clipper or FoxPro.....$399.00

2. Two phone lines Talking Xbase upgrade .........$199.00

3. One fax line Talking Xbase upgrade.............$199.00

4. Two lines Talking Access developer's toolkit,
   including one fax line - MS Visual Basic.......$499.00

5. Two phone lines Talking Access upgrade.........$299.00

6. One fax line Talking Access upgrade............$199.00

7. Maximum license Talking Xbase, including
   32 phone lines and 4 fax lines................$1000.00

8. Maximum license Talking Access, including
   32 phone lines and 4 fax lines................$1500.00

9. Source Codes for Voice-Mail, Auto Attendant,
   Audiotext, Fax-Back - Clipper or FoxPro........$999.00

10. Manual and Demo Disk ..........................$25.00
    (Applied on future purchases)



               30 DAY MONEY-BACK GUARANTEE

     DATABASE DEVELOPERS, TAKE ADVANTAGE OF THE MOST
    COMPETITIVE PRICES IN COMPUTER TELEPHONY INDUSTRY


For more information please call Universal Interactive Systems
at (818) 352-7800 or fax us at (818) 352-5445.
There are more documents and Demo Development System on
Clipper forum, Fox forum, MSACCESS forum

===================================================================

                      The Best choice:

                       Talking Xbase

              for  FoxPro or Clipper for DOS


Dear  Xbase  Developer:

HAVE YOU EVER THOUGHT THAT ONE OF THE MOST EXCITING PERIPHERAL DEVICES
         ATTACHED TO THE PC IS YOUR TOUCH-TONE TELEPHONE ?

The old telephone device with a touch-tone keypad is the most affordable
terminal in the world that can work with  your standard IBM PC machine.
It  provides a two way connection with the personal computer. You can enter
easily digital information and coded string data and you can get back
immediate conformation through voice files.

You can benefit from the biggest and cheapest network ever built - the
telephone network. The PC in your office will turn to a server which data
can be accessed by terminals-telephones located all over the world.

WHAT DO YOU  NEED TO START?

To use ANY telephone as a remote terminal, you need only TWO additional  items:

    1. A Voice Mail Board
    2. A Talking Xbase Software Package

WHAT DOES TALKING XBASE AIM TO?

The Talking Xbase Development Package is used for developing interactive
voice response (IVR) applications in Clipper or FoxPro utilizing Dialogic
or NewVoice voice boards.

         Hardware and Software Requirements

For developing a voice response application with Talking Xbase you must
have the following  products installed on your computer:

    - Clipper 5.1, 5.2 or FoxPro 2.5 and a Dialogic or NewVoice board
    - The Talking Xbase library corresponding to the voice board:
                CVOXDLG - version for Clipper and Dialogic D/4x (D/8x)
                CVOXNV - version for Clipper and NewVoice
                FVOXDLG - version for FoxPro and Dialogic D/4x (D/8x)
                FVOXNV - version for FoxPro and NewVoice

        Programming with TALKING XBASE

The most important feature of our Talking Xbase toolkit is the ABILITY to
create IVR application which WORK SIMULTANEOUSLY over several  telephone
lines in a single user environment such as MS DOS.  This means  that a
multi-line voice application handles together the algorithms for  several
lines and switches among lines accordingly to registered events. The events
that must be handled on a specific telephone line can be "phone ringing",
"touch tone registering" and many others.

In addition, the voice systems have access to  database files for  storing
data input by the user, for validating touch-tone entries, and  for
processing application related data.

The existing IVR systems usually solve the multitasking problem but to some
extent they ignore the database access. The Talking Xbase system is based on
your favorite database (Clipper or  FoxPro).  You are not limited in any way
in using the full capabilities of  your database product.  At the same time,
you specify the algorithms for  each telephone line separately and sequentially
ignoring the multitasking  issues that are handled automatically by the Talking
Xbase system.

Every Talking Xbase application is built up of two separate groups of  modules:

    (1) Modules in Clipper/FoxPro for handling database access, screen,
            keyboard, disk and other IO devices.

    (2) A module in Talking Xbase language describing the algorithms for
            interfacing with the voice board.  This module is called Talking
            Xbase  program which is built up of Talking Xbase statements.

The first group of modules are written in Clipper/FoxPro without any  language
limitations.  The only requirement is that Clipper/FoxPro programs  which are
to be called from a Talking Xbase program must be implemented as
Clipper/FoxPro
user-defined functions (UDF).  They are named 'callback'  functions.  The
callback functions can have parameters of any valid  Clipper/FoxPro type.

There is an additional group of functions for calling the voice board:

    (a) functions for checking various voice-board or line parameters such
            as "phone line connected ?", "number of lines supported by the
            board", and  "number of current program channel"
    (b) functions for manipulating Talking Xbase programs such as loading
            in memory and assignment different programs to different channels.

The above functions may be called by every Clipper/FoxPro module like  standard
functions.  In this text they are referred to as Talking Xbase  functions.

        TALKING XBASE Statements Description

Begin       Defines the starting line in the Talking xBase program
Call        Branches program execution to a specified with label line
CallP       Dials a telephone number using a telephone line and  analyzes
                the  result of the operation
Clipper/Fox/
Evaluate/@      Evaluates an expression or Clipper/FoxPro UDF
Dial            Dials a certain telephone number
GetDigits       Waits for touch-tone digits to be punched.
Goto            Unconditionally branches the execution of the program
If              Used to execute alternative portions of the Talking Xbase
                program  depending on a condition.
OffHook         Sets channel hook status equivalent to picking up the  phone
OnBreak         If OnBreak is specified, the phone line is regularly   checked
                for remote hang up.
OnHook          Sets channel hook status equivalent to hanging up the  phone
PlayFile        Plays back a pre-recorded voice file
RecFile         Records or re-records a voice file on the disk
Reset           Resets the internal Talking Xbase stack for Call  and Return.
Return          A Return without parameter transfers control to the  statement
                immediately following the Call statement
Sleep           Temporarily suspends the execution of the Talking Xbase  program
Wait            Loops while the parameter value evaluates to  false.
WaitRings       Waits until inbound ring(s) are detected.

        TALKING Xbase Functions Description

CCN()           Returns the number of the current channel.
CHANINIT()  Associates a loaded Talking Xbase program to a  channel
CLN()           This function is used for debugging and it returns an index
                from an internal Talking Xbase table.
CLRDGS()        Clears the buffer for the current channel.
CN()            This function reports the number of lines, no matter
                whether they are connected to the telephone network.
CURLINENO() This function is used for debugging, and it returns  the
                current line number in the source program
D40INIT()       This function initializes the voice board
DGS()           Returns a string containing touch-tone digits processed  with
                the most recent GetDigits statement
DOSERR()        Returns the last DOS error code for the specified channel
DRVDGS()    This function is used to check whether a digit is entered
                without executing the GetDigits statement.
DTMFRWB()   This function is used to set the parameters for  the  subsequent
                GetDigits statements.
FILERWB()   This function is used to set the parameters for the subsequent
                PlayFile and RecFile statements.
LASTCAR()   Returns the result of the last Call Progress Analysis
LASTERR()   Returns the last Talking Xbase error code for the  specified
                channel.
LASTEVENT()     Returns the last Dialogic/NewVoice event code.
LINESTAT()  Returns the line status for the specified channel.
LOADPGM()   This function loads an executable (compiled) Talking Xbase
                program in memory.
MAINLOOP()  This function interprets all loaded and initialized  Talking
                Xbase  programs.
RESTART()   Restarts the program for the specified channel.
RPMODE()    Sets the mode of operation for recording and playing.
SCHED()         This function provides time to the voice driver to  perform
                internal operations.
SETCPB()        The function is used to change the values of   parameters in the
                Channel Parameter Block.
SETDCB()    The function is used to change the values of  parameters  in the
                Dialogic Control Block.
SETIDIR()       This function sets a default directory for reading voice  files.
SETODIR()   This function sets a default directory for writing voice  files.
SIGNAL()        Sends a signal to the program working on a channel
SLEEP()         Temporarily suspends the execution of the program.
STATLS()        Returns the line status byte (Numeric).
STATLSH()       Returns the line status string.
STOPALL()   Stops any active Talking Xbase program.
STOPCH()        Terminates any multitasking Talking Xbase operations.
TERMINATE()     Terminates the active Talking Xbase program.
TMO()           Timeout after the last PlayFile, RecFile or GetDigits
TXTLINE()   Returns  the contents of the line as a string.


            The Fax Module

The Fax module provides fax support to the Talking Xbase system. The module  is
implemented as a set of Clipper/FoxPro functions, and it is not a part  of the
Talking Xbase interpreter.  This means that faxes can be sent from  any
Clipper/FoxPro program, even programs not dealing with voice  applications.

The fax module supports the CAS programming interface developed by Intel  and
DCA.  The CAS (Communicating Application Specification) interface  provides a
high-level access to the functions of a fax board.  The CAS  interface is
implemented as a module called The CAS Manager.  The CAS  Manager is usually a
resident program or a device driver, and it comes with  the software of the fax
card.

Only YOUR IMAGINATION could be a limit for the variety of application  systems
you wish to design.

A few examples of IVR systems are:

        - Banks or any kind of financial system
        - Tree structure informational system
        - Voice mail, Fax on Demand, Audiotext
        - Telemarketing
        - Party/Chat Lines
        - Dateline Classified
        - Appointments Reminder
        - Inventory Track
        - Gathering of statistical information

HOW MUCH  SHOULD YOU CHARGE YOUR CUSTOMERS FOR  IVR SYSTEMS ?

    One machine can do the work of 50 ordinary men.
    No machine can do the work of one extraordinary man.
                                Elbert Hubbard

IVR Systems are designed to accept many routine phone calls replacing the
live operator. An average operator could take between 200 and 350 phone
calls daily. If your Talking Xbase application replaces one operator with
yearly salary of $20,000.00, you may easily charge your customer between
$5,000.00 and $8,000.00.

Give it a try with Talking Xbase!

         THERE ARE NO RUN-TIME CHARGES!!!!!

To order Talking Xbase, please
   call us at   (818) 352-7800
   or fax at    (818) 352-5445

    COMPUSERVE   72722,312


    Universal Interactive Systems
    9444 Haines Cyn. Ave.
    Tujunga, CA 91042

We look forward in helping you write more advanced Xbase applications in
Clipper and FoxPro!

Sincerely,
Val Babadzhov
Founder

All trade names referenced herein are either trademarks or
registered trademarks of their respective companies.
