T h e U l t i m a t e T e l e m a r k e t i n g P C B o a r d
This is a beta information - 18/Nov/98
The board uses the I/O address 0x280 (hexadecimal). If you have an other device using
this address, you MUST change it to other one.
You may not change the board's address. It uses just the address's range 0x280 till 0x28F.
There is a lot of functions that you can access BUT if they are not documented here, do
not use, they can hang up your computer and produces
unexpected results which just you are responsible for that.
Due the hurry in those first commercial applications, some functions showed in this
demo can not be explained, just do not use it. You are going to
receive an actual information as soon as possible.
For more technical information, request by e-mail.
CyberVox Block Diagram
The board as a connection to the telephone line and a connection to the headset's operator.
Let's see the board as a telephone device that has an extension inside where we are going to refer as the headset connection.
When this virtual telephone is disconnect from telephone line, we are going to assume
an ONHOOK condition and when the phone is
ONLINE we are going to call this situation as OFFHOOK. The same can apply about the
operator's headset, that behaviors as a regular
telephone extension.
You may put the board connected to the telephone line through the function OffHkLine
(remember Off Hook Line). Due the Clipper's
function name restrictions just those first 10 characters are considered. So, we had to
decided which best name were chosen to remember
those functions.
Remember when you put the board connected to the phone system, you must always keep a
valid connection giving access to the line with
the board or with the headset, otherwise the phone line connection will drop down.
One more time: There's a lot of other function here but do not use it UNLESS they are
documented here.
New functions
Board()
Rring() OnHookAll()
OffHookAll()
Functions UpDates
DspVer()
Play() Rec()
ResetDsp() Wait4Ring()
Functions
Function.......... OnHkLine()
Meaning........... On Hook Line - Simulates a
condition like put the phone
on hook, turns off the telephone.
Input Parameter... none
Output Parameter.. none
Example........... OnHkLine()
quit
Function.......... OffHkLine()
Meaning........... Off Hook Line - Disconnects the
board from the telephone
line.
Input Parameter... none
Output Parameter.. none
Example........... OffHkLine()
quit
Function.......... OnHkHead()
Meaning........... On Hook HeadSet - Puts the
headset connection through
the line.
It is exactly as a telephone extension.
Input Parameter... none
Output Parameter.. none
Example........... OnHkHead()
quit
Function.......... OffHkHead()
Meaning........... Off Hook HeadSet - Puts the
headset connection through
the line. Same as you put the telephone extension
out off
the line
Input Parameter... none
Output Parameter.. none
Example........... OffHkHead()
quit
Function.......... OnHookAll()
Meaning........... On Hook Line AND HeadSet - This
is the functions OnHkLine()
and OnHkHead() executed at same time
Input Parameter... none
Output Parameter.. none
Example........... OnHookAll()
// Turns ON both Line and HeadSet
quit
Function.......... OffHookAll()
Meaning........... Off Hook Line AND HeadSet - This
is the functions OffHkLine()
and OffHkHead() executed at same time
Input Parameter... none
Output Parameter.. none
Example........... OffHookAll()
// Turns OFF both Line and HeadSet
quit
Function.......... DialPulse( <string>
)
Meaning........... Allows you to make a call to
somebody phone number.
Please, watch those examples to understand the correct
phone timing signaling.
Input Parameter... The number string to be dialed.
You may also have some
extra characters to be dialed with special meaning: a comma
(,) means a delay of one second and the pound signal (#)
means a flash in line (offline, half second delay, online).
Some PABXs systems needs this mechanism to get outside line.
Output Parameter.. none
Example...........
OffHkLine()
// put the line in OffHook
inkey(2)
// wait for dial tone signal
DialPulse("5551234") // dial string
551234
OffHkHead()
// switch to headset
inkey(0)
// wait for a key to hangup
OnHookAll()
// hangup line and headset
quit
// quit program
Function.......... DialTone( <string>
[,level] )
Meaning........... Dial a string number using the
Dual Tone Multi Frequency
method. Be sure that your local telephony company's
central allows that, otherwise, you will not call the
desired number, getting a continuos tone line after a
string had been dialed.
Input Parameter... The same facilities from the
function DIALPULSE can
be used here like comma (,) and the pound signal (#).
An optional
numeric parameter "level" can be used. This is the
audio level to be dialed. Some PABXs can not
recognize DTMF
tones at
full level. You may use the following levels:
0 = full level
1 = 1/2 level
2 = 1/4 level
3 = 1/8 level
4 = 1/16 level
If you do not send this parameter, the function will assume
the level 0 (full level).
Output Parameter.. none
Example...........
OffHkLine()
// put the line in OffHook
inkey(2)
// wait for dial tone signal
DialTone("5551234") // dial
string 551234
OffHkHead()
// switch to headset
inkey(0)
// wait for a key to hangup
OnHookAll()
// hangup line and headset
quit
// quit program
Function.......... Ring()
Meaning........... Detects the ring signal. If
somebody is calling you,
this function will detect it to you.
Input Parameter... none
Output Parameter.. returns the number 1 when the
ring signal is valid and
the number 0 when not.
See Also.......... You may use the Extended
Function WAIT4RING()
Observation....... use this function just if you
have the new CyberVox board.
See BOARD() function
to more details. Any doubt, just use RRING() function.
Example...........
OnHookAll() // On Hook Line and HeadSet
do while ! Ring() // wait for ring
inkey(0.1) // little delay
enddo
//
OffHkHead() // accept the call in HeadSet
inkey(0) // wait for a
key
OnHkHead() // Ends the call
quit
// quit the program
Function.......... Rring()
Meaning........... Detects the ring signal. If
somebody is calling you,
this function will detect it to you.
Input Parameter... none
Output Parameter.. returns the number 1 when the
ring signal is valid and
the number 0 when not.
See Also.......... You may use the Extended
Function WAIT4RING()
Observation....... The hardware are different in
boards NEW and OLD. The ring
detect circuit are a bit different. This function will detect
your board and return the correct value.
Example...........
OnHookAll() // On Hook Line and HeadSet
do while ! Rring() // wait for ring
inkey(0.1) // little delay
enddo
//
OffHkHead() // accept the call in HeadSet
inkey(0) // wait for a
key
OnHkHead() // Ends the call
quit
// quit the program
Function.......... DspVer()
Meaning........... Returns the DSP's firmware
version. You may use this
function to determine if the dsp board is installed.
Input Parameter... none
Output Parameter.. Returns a number about the
firmware version. The current
version is 8 (November 1998). The function will return a -1
if an error occur.
Example........... if DspVer() = -1
? "Error during DspVer() function"
quit
endif
Function.......... Play( <filename> )
Meaning........... Plays a file previously recorded
Input Parameter... filename, a string with the
file's name
Output Parameter.. the total bytes played or -1 if
an error occur
like file not found, board error, diskfull, etc.
Important......... The board uses a proprietary
audio format that can be
used with a large of commercial programs. The audio format
used by the board is:
PCM a-law companded, sampling frequency of 9765 kHz;
8 bits; mono, unsigned data.
Observation....... You may use the keys
<SHIFT> to abort the Play function.
Example...........
OnHookAll()
// On Hook Line and HeadSet
do while ! Ring() // wait for
ring
inkey(0.1)
// little delay
enddo
//
OffHkLine()
// accept the call in HeadSet
inkey(1)
// wait a second
ptime := play("test.vox") // plays a file previous recorded file
if ptime = -1
//
check for error
? "Error in Play() function"
quit
endif
OnHkLine()
// Ends the call
quit
// quit the program
Function.......... Rec( <filename>,
TimeLength )
Meaning........... Records a file during the
TimeLegth period which is an
32 bits integer that can afford around 109 years time
recording !!!
Input Parameter... filename; time in seconds to
record
Output Parameter.. bytes recorded or -1 if an error
occur like diskfull, path not
found, board error, etc
Observation....... You may use the keys
<SHIFT> to abort the Record function.
Example...........
OnHookAll()
// On Hook Line and HeadSet
do while ! Ring() // wait for ring
inkey(0.1) //
little delay
enddo
//
OffHkLine()
// accept the call in HeadSet
rt := Rec("test.vox", 5) // records a 5 seconds file
if
rt = -1
? "Error during Rec() function"
quit
endif
? rt
?? " bytes were recorded !"
Play("test.vox") // plays
the file
OnHkLine()
// Ends the call
quit
// quit the program
Function.......... ResetDsp()
Meaning........... Resets the board putting it in a
ready mode
Input Parameter... none
Output Parameter.. .T. if reset was Ok or .F. if an
error occur
Observation....... Some seconds are spended to
execute this function until
an error are detect. Just wait, your system is not in a
HANG condition !
Example........... if ResetDsp() //
resets the board and leave it in ready mode
quit // quits program
Function.......... Wait4Ring()
Meaning........... Wait for ring - Waits for n
rings until the board
accepts the incoming call.
Input Parameter... number of rings to be accepted
Output Parameter.. .T. if a signal arrived or .F.
if ESC key was pressed
aborting the function
Example...........
OnHookAll() // On Hook Line and HeadSet
Wait4Ring(2) // wait for the second ring
OffHkHead() // accept the call in HeadSet
inkey(0) // wait for a
key
OnHkHead() // Ends the call
quit
// quit the program
Function.......... Board()
Meaning........... Detects hardware version.
Input Parameter... none
Output Parameter.. 1 for the "small
board" produced after 1997.
0 to the versions produced before 1997
Observation....... The hardware difference between both boards is just the RING
detect circuit. Use function RING() JUST to the NEW board.
The best thing to do is: use the RRING() function that will
automatically detects your hardware
Example........... If Board() = 1
// New board returns 1
? "New Board"
else
? "Old Board"
endif
quit
// quit the program
info@cybervox.freeservers.com