home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Acorn User 3
/
AUCD3.iso
/
airport
/
demos
/
callerdemo
/
TechInfo
/
ProgInfo
< prev
Wrap
Text File
|
1996-12-05
|
3KB
|
77 lines
PROGRAMMER'S INFORMATION FOR CALLER ID
Paul Skirrow, Octopus Systems, October 1996
CallerID has been written to interact with other applications and
utilities to make it as useful as possible. This information is intended
for programmers who may wish to make their application respond to incoming
calls.
When a new call is received the CallerID application performs the following
actions:
1. Look up number in the internal names directory
2. Display new call window with number (and name if available)
3. Execute the NewCall file (if it exists) in !CallerID.Files
4. Execute the file associated with the number (if there is one)
5. Broadcast the Wimp message &4DEC0
NewCall File
------------
The NewCall file can be a BASIC program, an Obey file, or any other
executable file. If you wish to perform several dsitinct actions when a call
is received you can create an Obey file which itself runs several
other programs. For example, to stop the audio CD and display a price list
you could use something like this in an Obey file:
Filer_Run ADFS::HardDisc4.docs.Pricelist
CDFS:stop
The following parameters are passed to the NewCall application when
it starts:
flags "number" "name"
The flags are explained below. The number is simply the caller's
number (which may be blank if withheld), and the name is the
caller's name from the CallerID directory. The name and number will
be exactly as displayed in the new call window and will be passed
in quotation marks.
Further paramters may be passed in future releases, so it is important
that you ignore any extra parameters that exist.
WIMP Message
------------
The Wimp message is intended to be picked up by other applications that
are already loaded, and may be used for other apps to open customer
records or display particular information. It is used to pass the
caller's number to Prophet and to other applications.
When a call is received the CallerID program broadcasts WimpMessage
&4DEC0 and sends the following data in the message block:
4 bytes Flags
n bytes number (ASCII text, null terminated)
m bytes name (ASCII text, null terminated)
It would be reasonable to allocate fixe sized buffers and we would suggest
40 chars for the number (which may include other status information) and 50
chars for the name (but don't assume that longer strings will not be
broadcast).
Each bit in the flags word is allocated a specific meaning by Octopus
Systems. Allocations so far, include:
Bit 0 0 if call is incoming.
1 if call is outgoing (not yet availablefla).
Bit 1 Alert Prophet (ie if this bit is set, Prophet should
search for the number in the supplier and customer lists
and if found open the relevant record)
If an application sees a telephone number that it doesn't recognize it
should do nothing. It must not generate an error.