Application programming interface for modem and ISDN processing6023473Abstract An application programming interface provides for command and data communication between a user, application or driver and a telephone data processing system which provides communication between a host computer and a telephone line. The telephone data processing system is capable of processing ISDN telephone calls as well as voice or analog-originated telephone calls. The application programming interface of the invention includes a host interface, an ISDN interface and a modem interface. The host interface receives commands and data from the user. The modem interface and ISDN interface provide commands and data communication between the host interface and the appropriate telephone call processing based on telephone call type. At the top level, the specific call type processing is transparent to the user. That is, the user need not know the type of telephone call, i.e., modem or ISDN, being processed. Claims What is claimed is: Description BACKGROUND OF THE INVENTION
TABLE 1
______________________________________
Host API Function Call Summary
Call Type
Function Purpose
______________________________________
Initialization
MICA.sub.-- Accept ()
Accept an incoming call.
MICA.sub.-- Close ()
Close a data channel; used for
terminating a call
MICA-Connect ()
Dial the phone
MICA.sub.-- Init ()
Initialize the boards; should be
called once per board.
MICA.sub.-- Listen ()
Listen on a channel for an in-
coming call.
MICA.sub.-- Open ()
Open a channel for listening or
dialing.
MICA.sub.-- Reset ()
Reset a board; used when a
board needs to be restarted.
Data Flow
MICA.sub.-- Recv ()
Receives data (if any) from a
previously opened channel.
MICA.sub.-- Select ()
Check a channel's status.
MICA.sub.-- Send ()
The channel must be opened
first; sends data out to the
MICA board set.
Control MICA.sub.-- GetOption ()
Get the status of a system op-
Messages tion.
MICA.sub.-- ProcessInt ()
Process a MICA interrupt.
MICA.sub.-- SetOption ()
Set or modify a system option.
______________________________________
All of the host API function calls send parameters with each function call. Each function also returns a result code to indicate the result of the function call. Each function call will now be described in detail. The MICA.sub.-- Accept call is used to accept an incoming call on a particular channel. A sample format for the call is as follows:
______________________________________
MICA.sub.-- Accept (
int16 channelId
______________________________________
The parameter channelld indicates the ID number of the channel on which the call is to be accepted. The possible result codes are as follows:
______________________________________
MICA.sub.-- SUCCESS The call is accepted.
MICA.sub.-- ERROR The call is rejected.
______________________________________
The MICA.sub.-- Close function call is used to close a data channel. A sample format is as follows:
______________________________________
MICA.sub.-- Close (
int16 channelId
______________________________________
The parameter channelld is used to identify the channel that is to be closed. The possible result codes are as follows:
______________________________________
MICA.sub.-- SUCCESS
The channel is closed.
MICA.sub.-- INVALID.sub.-- CHANNEL
The channel provided was not valid.
MICA.sub.-- NOT.sub.-- OPEN
The channel was not open.
MICA.sub.-- ERROR
Either the ISDN or the modem board
didn't close.
______________________________________
The MICA.sub.-- Connect function call is used to open a data channel to initiate an out-going telephone call. A sample format for the call as follows:
______________________________________
MICA.sub.-- Connect (
int16 channel Id,
char *phoneNumber,
void (*callBack)(channelId, event.sub.-- mask)
______________________________________
If the optional callBack routine is provided, it is executed after the connection is made. The channelid is returned with the callBack routine allowing a use of a single callBack routine with many channels. The event--mask reflects the state of the channel after the connection is made. The parameter channelld identifies the channel to be dialed. If the callBack routine is used, the channeled is provided. The parameter phoneNumber is a pointer to the phone number to be dialed. The number is in ASCII text format. The callBack parameter identifies thc callback routine, and the parameter event--mask identifies the status of the channel after the connection is completed. It should be noted that prior to calling the MICA Connect function, the application must call MICA.sub.-- Open. The possible result codes returned after the MICA.sub.-- Connect call are as follows:
______________________________________
MICA.sub.-- CHANNEL.sub.-- NOT.sub.-- OPEN
The channel was not opened.
MICA.sub.-- CONNECT.sub.-- NO.sub.-- CHAN-
There are no available channels.
NELS
MICA.sub.-- ERROR
General Error message.
MICA.sub.-- INVALID.sub.-- CALL.sub.-- TYPE
The call type was invalid.
MICA.sub.-- SUCCESS
Connecting.
MICA.sub.-- INVALID.sub.-- CHANNEL
The channelId provided was invalid.
______________________________________
The MICA.sub.-- GetOption function call is used to get status and other information from the board set. A sample format for the MICA.sub.-- GetOption call is as follows:
______________________________________
MICA.sub.-- GetOption(
int16 channelId,
int16 *micaCommand,
char *returnData
______________________________________
The requested data is written into the returnData buffer. Note that this buffer should be large enough to hold the maximum size return message. The parameter board--set identifies the MICA board set on which the operation is to be performed. The micaCommand parameter identifies the command, and the returnData parameter indicates the returned data value. The possible result codes are as follows:
______________________________________
MICA.sub.-- INVALID.sub.-- COM-
The specified command was not recog-
MAND nized.
MICA.sub.-- SUCCESS
The command completed successfully.
MICA.sub.-- ERROR
The command failed to complete.
______________________________________
The MICA.sub.-- Init function call is used to initialize the telephone data processing system 24. For one embodiment, a sample format for the call is as follows:
______________________________________
MICA.sub.-- Init (
mica.sub.-- status.sub.-- str
* micaStr,
char *buffer,
int16 buffer.sub.-- len,
int16 channels,
int16 channelIds
______________________________________
The micaStr parameter identifies the MICA status structure. The buffer parameter identifies memory allocated for MICA structures. The buffer--len parameter identifies the size of the buffer in bytes. The channels parameters identifies the number physical channels, and the channellds parameter identifies the number of virtual channels. The possible result codes are as follows:
______________________________________
MICA.sub.-- INIT.sub.-- INSUFFICIENT.sub.-- DATA
Not enough information was
provided.
MICA.sub.-- INIT.sub.-- INSUFFICIENT.sub.-- BUF
The buffer provided was too
FER small.
MICA.sub.-- ERROR The command failed to
complete.
MICA.sub.-- SUCCESS The command completed
successfully.
______________________________________
Note: the calling application is responsible for allocating sufficient space for the MICA Status structure (for example malloc (size of (mica.sub.-- status.sub.-- str))). The MICA API assumes sufficient space has been allocated. The MICA.sub.-- Listen function call is used to open a data channel to receive an incoming call. An example of its format is as follows:
______________________________________
MICA.sub.-- Listen (
int16 channelId,
char *phoneNumber,
void (*callBack)(channelId, event mask)
______________________________________
The channelId parameter indicates the assigned channel. When used in the callBack routine, the channelld represents the channel on which the called was received. The phone-Number parameter indicates the number to listen for; the callBack parameter indicates the routine that is to be executed when the call arrives and the parameter event--mask indicates the state of the channel after the call is accepted. Possible result codes are as follows:
______________________________________
MICA.sub.-- SUCCESS
The channel was opened successfully.
MICA.sub.-- CHAN.sub.-- INVALID
The channel parameter was invalid.
______________________________________
The MICA.sub.-- Open function call is used to open a data channel. A sample format for the call is as follows:
______________________________________
MICA.sub.-- Open (
int16 callType,
int16 direction,
int16 assignResource,
int16 *error
______________________________________
The callType parameter indicates the type of call being requested, i.e., ISDN or modem. The direction parameter indicates whether the call is an inbound or outbound call. The assignResource parameter allocates the modem or ISDN channel to the identified MICA channel. This parameter is typically assigned a Boolean true/false variable. The error parameter is a pointer to a variable for error reporting. This avoids confusion between a valid channel ID and an error value. The optional callType and direction parameters are of particular use when some channels arc restricted to outbound or inbound calls only. The assignResource parameter is useful when over-subscription of the channels is allowed. If the call is successful, a channelId is returned. If an error occurred, MICA.sub.-- ERROR is returned. The error type is identified in the error byte. The possible values for error are:
______________________________________
MICA.sub.-- OPEN.sub.-- INVALID.sub.-- TYPE
The callType is invalid.
MICA.sub.-- OPEN.sub.-- INVALID.sub.-- DIRECTION
The direction was invalid.
MICA.sub.-- OPEN.sub.-- NO.sub.-- CHANNELS
No idle channels.
______________________________________
The MICA.sub.-- ProcessInt function call is used to process an interrupt. Once an interrupt service routine or polling routine has detected that a board needs service, this routine is used to service the board. A format for the call is as follows:
______________________________________
MICA.sub.-- ProcessInt(
int16 intType,
int16 callType
______________________________________
The intType parameter indicates the type of interrupt received, i.e., data or control. The callType parameter indicates the call type, i.e., ISDN or modem. The possible result codes are as follows:
______________________________________
MICA.sub.-- SUCCESS
The board(s) were successfully
serviced.
MICA.sub.-- ERROR
An error occurred while servicing the
boards(s).
______________________________________
The MICA.sub.-- Recv function call is used to hand a data buffer to receive data for a specific channel. A format for the call is as follows:
______________________________________
MICA.sub.-- Recv (
int16 channelId,
char *dataBuffer,
int16 bufferSize
______________________________________
The channelId parameter indicates the channel from which data is received. The dataBuffer parameter indicates the buffer in which the data is placed, and the bufferSize parameter indicates the number of bytes that can be written into the buffer. The buffer-Size parameter is normally the maximum number of bytes that can be inserted into the data buffer. The return result is typically the number of bytes actually written into the data buffer. If an error occurred while data is being copied into the buffer, an error bit, typically -1, is returned. The MICA.sub.-- Reset function call is used to reset the MICA board set(s). A format for the call is as follows:
______________________________________
MICA.sub.-- Reset(
int16 board.sub.-- to.sub.-- reset
______________________________________
The parameter board--to--reset indicates which board is to be reset, since more than one MICA board set can be used in the system. After this function is called, the MICA board set must be reinitialized by calling MICA.sub.-- Init before any other calls can be made. The typical result codes returned after a MICA Reset call are as follows:
______________________________________
MICA.sub.-- SUCESS
The board set was successfully reset.
MICA.sub.-- ERROR
An error occurred while resetting the
board(s).
MICA.sub.-- INVALID.sub.-- NUMBER
board.sub.-- to.sub.-- reset was set to an invalid
number.
______________________________________
The MICA.sub.-- Select function call is used to obtain channel status information such as the connection statc of a particular channel. A format for the call is as follows:
______________________________________
MICA.sub.-- Select (
int16 channelId,
int16 statusMask
______________________________________
The parameter channelld identifies the channel, and statusMask is a data word which masks off unwanted information. If the statusMask is set to zero, the space available in the transmit buffer is returned in response to the function call. The returned value is either the channel status, the space available in the transmit buffer or MICA.sub.-- ERROR. If the most significant bit of the returned value is set, the returned value is MICA.sub.-- ERROR, not the channel status. The MICA.sub.-- Send function call is used to hand a data buffer to a specific channel. A format the MICA.sub.-- Send call is as follows:
______________________________________
MICA-Send (
int16 channelId,
char *dataBuffer,
int16 bytes
______________________________________
The channelId parameter identifies the channel from which data is received; the dataBuffer parameter identifies the buffer into which the data is placed; and the bytes parameter indicates the total number of bytes to be transmitted. It should be noted that data cannot be transmitted until a channel has entered the active state. Successfully connecting to a destination or accepting an incoming call causes the channel to transition to the active state. The channel's status may be verified by using the MICA Select call. The result of the MICA Send call is the number of bytes actually transmitted. If an error occurs during transmit, MICA.sub.-- ERROR(-1) is returned. The MICA.sub.-- SetOption call is used to send various command and control messages to the MICA telephone data processing system 24. A list of the commands that can be sent is contained in Tables 2 and 3. Table 2 lists modem mode commands, and Table 3 lists ISDN mode commands.
TABLE 2
__________________________________________________________________________
Set Channel Option Modem Commands
Command Value(s) Description
__________________________________________________________________________
MICA MODEM.sub.-- MODE
Originate/Answer
Set the modem to Origi-
nate or Answer mode
MICA.sub.-- MODEM.sub.-- CALL.sub.-- TONE
Send Determines whether the
modem should send
calling tone or not.
MICA.sub.-- MODEM.sub.-- GUARD.sub.-- TONE
Use Tone Should the modem use
guard tone for
V 22/V22bis.
MICA.sub.-- MODEM.sub.-- FORMAT
Async, LAPM, MNP,
Set the modem's data
ARA transmission format
negotiation parameters.
MICA.sub.-- MODEM.sub.-- AUTOD
Autodetect
Automatically detect the
peer's protocol.
MICA.sub.-- MODEM.sub.-- AUTOD.sub.-- TO
0-25.5 s Autodetect timeout
period.
MICA.sub.-- MODEM.sub.-- BREAK.sub.-- MODE
Expedited, Destructive
Sets the break process-
ing method for the mo-
dem.
MICA.sub.-- MODBM.sub.-- BUFF.sub.-- LEN
0-64 Protocol buffer length.
MICA.sub.-- MODEM.sub.-- NEGOT.sub.-- TO
0-25.5 s Timeout for Protocol
Negotiation.
MICA.sub.-- MODEM.sub.-- NEGOT.sub.-- FALL.sub.-- B
ASCII Value
The character causing
negotiation fallback.
MICA.sub.-- MODEM.sub.-- COMPRESSION
None, V.42bis, MNP5
Compression method
used by the modem.
CA.sub.-- MODEM.sub.-- MODEM.sub.-- VXX
V.34bis, V.32bis,
The modem standard to
V.22bis use.
MICA.sub.-- MODEM.sub.-- MAX.sub.-- CONN.sub.-- RATE
1-14 2400 * the number
specified.
MICA.sub.-- MODEM.sub.-- MIN.sub.-- CONN.sub.-- RATE
1-14 2400 * the number
specified.
MICA.sub.-- MODEM.sub.-- SIG.sub.-- QUAL.sub.-- LEVEL
1-5 The line signal quality
threshold.
MICA.sub.-- MODEM.sub.-- TX.sub.-- LEVEL
0-15 dbm The transmit level.
MICA.sub.-- MODEM.sub.-- IDLE.sub.-- TO
1-255 s Idle line timeout.
MICA.sub.-- MODEM.sub.-- FRAME.sub.-- RETX
0-255 s Frame retransmission-
limit.
MICA.sub.-- MODEM.sub.-- NO.sub.-- DCD.sub.-- HANGUP
0-25.5 s Lost carrier hang-up
delay.
MICA.sub.-- MODEM.sub.-- RETRAIN.sub.-- DISC
1-255 s Consecutive re-train
disconnects.
MICA.sub.-- MODEM.sub.-- FALL.sub.-- FWD.sub.-- TIMER
1-255 s 0 Disconnects.
MICA.sub.-- MODEM.sub.-- RDL.sub.-- RESPONSE
Enable Remote Diagnostic
Loopback response.
MICA.sub.-- MODEM.sub.-- COUNTRY.sub.-- CODE
0-255 Country Location.
MICA.sub.-- MODEM.sub.-- MIN.sub.-- ANSWER.sub.-- BACK
0-255ms Answer back time.
MICA.sub.-- MODEM.sub.-- CALL.sub.-- TONE.sub.-- GAIN
0-15 dbm Call Tone Gain.
MICA.sub.-- MODEM.sub.-- V.34.sub.-- INFO
Information bits for
V.34.
__________________________________________________________________________
A sample format for the MICA SetOption function call is as follows:
______________________________________
MICA.sub.-- SetOption (
int16 channelId,
unsigned long micaCommand,
char *arg
______________________________________
The board--set parameter identifies the MICA board set to be modified. The micaCommand parameter is the command being sent and the arg parameter is the command modifier. The commands are validated and then routed to the appropriate modem or ISDN routine. Possible result codes are as follows:
______________________________________
MICA.sub.-- INVALID.sub.-- COMMAND
The command specified was not
recognized.
MICA.sub.-- SUCCESS
The command completed
successfully.
MICA.sub.-- ERROR The command failed to complete.
______________________________________
As previously indicated the host API 18 described above interfaces with lower-level APIs 20 and 22 depending upon the call type. Where a call is a modem type call, the host API 18 interfaces with the modem API 20. The modem API 20 provides low-level function calls to modem processing such as that described in the co-pending patent application Ser. No. 08/686,990, incorporated herein. The modem API library of function calls provides an interface between the host API 18 and board-specific function calls. Table 4 includes a list of these modem API functions.
TABLE 4
__________________________________________________________________________
Modem API Function Call Summary
Call Type
Function Purpose
__________________________________________________________________________
Call Management
MICA.sub.-- MODEM.sub.-- Close ( )
Terminate a call.
MICA.sub.-- MODEM.sub.-- Intitiate
Either originate or answer a call.
Determined by tbe modem configura-
tion.
MICA.sub.-- MODEM.sub.-- LinkCtrl ( )
Force speed shift in modem.
MICA.sub.-- MODEM.sub.-- ProcessCtrlMsg ( )
Process a control message interrup
from the modem board.
MICA.sub.-- MODEM.sub.-- ProcessDataMsg ( )
Process a data message interrupt from
the modem board.
MICA.sub.-- MODEM.sub.-- Reset ( )
Software reset of the modem.
MICA.sub.-- MODEM.sub.-- SendCtrlMsg ( )
Send a control message to the mo-
dem.
MICA.sub.-- MODEM.sub.-- SetOption ( )
Set Modem Options.
Data Flow
MICA.sub.-- MODEM.sub.-- Recv ( )
Receive data from the modem.
MICA.sub.-- MODEM.sub.-- SEND ( )
Send data to the modem.
Initialization
MICA.sub.-- MODEM.sub.-- Configure ( )
Used to configure a modem for a
calll.
MICA.sub.-- MODEM.sub.-- Init ( )
Initialize the System information.
MICA.sub.-- MODEM.sub.-- Load ( )
Load the Modem Board.
Status MICA.sub.-- MODEM GetOption ( )
Used to solicit the link state
__________________________________________________________________________
info.
A detailed description of each of the modem API function calls follows. The MICA.sub.-- MODEM.sub.-- Close function call is used to terminate a telephone call. A format for the call is as follows:
______________________________________
MICA.sub.-- MODEM.sub.-- Close (
channel.sub.-- str
______________________________________
The channelPtr parameter is used to identify the channel that is to be closed. Possible result codes are as follows:
______________________________________
MICA.sub.-- Chan.sub.-- Invalid
The channel was not valid.
MICA.sub.-- SUCCESS
The channel will be closed.
______________________________________
The MICA.sub.-- MODEM.sub.-- Configure function call is used to configure a modem. A format for the function is as follows:
______________________________________
MICA.sub.-- MODEM.sub.-- Configure(
int16 channelId,
int16 dial,
______________________________________
The channelId parameter identifies the modem to be modified and the dial parameter indicates whether the modem should dial a telephone number. The result code that can be returned following the function are as follows:
______________________________________
MICA.sub.-- SUCCESS
The command was sent to the modem.
MICA.sub.-- ERROR
An error occurred.
______________________________________
The MICA.sub.-- MODEM.sub.-- GetOption function is used to retrieve the status of a modem. A format for the function call is as follows:
______________________________________
MICA.sub.-- MODEM.sub.-- GetOption (
channelId.sub.-- str *channelIdPtr,
int16 command,
char *arg
______________________________________
The channelIdPtr parameter identifies the modem to be modified; the command parameter identifies what is to configured and the arg parameter is a pointer to the buffer for the returned data. Possible result codes are as follows:
______________________________________
MICA.sub.-- MODEM.sub.-- SUCCESS
The command was sent to the modem.
MICA.sub.-- MODEM.sub.-- ERROR
The parameter was invalid.
______________________________________
The MICA.sub.-- MODEM.sub.-- Init function call is used to initialize the modem board. A format for the call is as follows:
______________________________________
MICA.sub.-- MODEM.sub.-- Init (
modem str *modemBoard
______________________________________
The parameter modemBoard is a pointer to the modem board structure. Possible result codes are as follows:
______________________________________
MICA.sub.-- SUCCESS
The command was sent to the mo-
dem.
MICA.sub.-- MODEM.sub.-- PARAM.sub.-- IN-
The parameter was invalid.
VALID
MODEM CHAN INVAL ID
The channel was invalid.
______________________________________
It should be noted that this function should be called prior to calling MICA.sub.-- MODEM.sub.-- Load. The MICA.sub.-- MODEM.sub.-- Initiate function call is used to call the modem to originate or answer a call on a data channel. A format for the function is as follows:
______________________________________
MICA.sub.-- MODEM.sub.-- Initiate (
channelId.sub.-- str *channelIdPtr
______________________________________
The channelIdPtr parameter identifies the channel of the telephone call. It should be noted that the ISDN processor 44 in the telephone data system 24 must have accepted an inbound call or originated an outbound call prior to calling 5 this function. Possible result codes include:
______________________________________
MICA.sub.-- MODEM.sub.-- SUCCESS
The command was sent to the mo-
dem.
MICA.sub.-- MODEM.sub.-- PARAM.sub.-- IN-
The parameter was invalid.
VALID
MODEM.sub.-- CHAN.sub.-- INVALID
The channel was invalid.
______________________________________
The MICA.sub.-- MODEM.sub.-- Load function call is used to load the modem board. A format for the function call is as follows:
______________________________________
MICA MODEM Load (
modem.sub.-- str *modemBoard
______________________________________
The parameter modemBoard is a pointer to the modem board structure. Possible result codes are as follows:
______________________________________
MICA.sub.-- SUCCESS
The board was loaded.
MICA.sub.-- ERROR The parameter was invalid.
______________________________________
The MICA.sub.-- MODEM.sub.-- Recv function call is used to receive data from a specific modem. A format for the function call is as follows:
______________________________________
MICA.sub.-- MODEM.sub.-- Recv (
channel.sub.-- str *channelPtr,
char *dataBuffer,
int16 buffer size
______________________________________
The channelPtr parameter identifies the channel from which the data is received; the dataBuffer parameter identifies the buffer into which the data is placed; and the buffer size parameter indicates the maximum number of bytes that can be placed in the buffer. The result code value returned by the function is the number of bytes actually received. The MICA.sub.-- MODEM.sub.-- Reset function call is used to perform a software reset of a modem board. A format for the function call is as follows:
______________________________________
MICA.sub.-- MODEM.sub.-- Reset (
int16 board
______________________________________
The board parameter identifies the board that is to be reset. Possible result codes are as follows:
______________________________________
MICA.sub.-- SUCCESS
The board was reset.
MICA.sub.-- ERROR
The board number was invalid or the
board failed to reset.
______________________________________
The MICA.sub.-- MODEM.sub.-- Send function call is used to send data to a specific modem. A format for the function call is as follows:
______________________________________
MICA.sub.-- MODEM.sub.-- Send (
channel.sub.-- str *channelPtr,
char *dataBuffer,
int16 bytes
______________________________________
The channelPtr parameter indicates the channel that the modern is assigned to or associated with. The dataBuffer parameter identifies the buffer in which the data is located; and the bytes parameter indicates the number of bytes to be sent. It should be noted that data cannot be transmitted until the modem has entered the active state. The function call MICA.sub.-- MODEM.sub.-- Intiate will cause the modem to transition to the active state. The modem's status may be verified by using the MICA.sub.-- Select function call. The result value of the MICA.sub.-- MODEM.sub.-- Send call is the number of bytes actually transmitted or MICA.sub.-- ERROR if an error occurred during the send process. The MICA.sub.-- MODEM.sub.-- SetOption function call is used to configure a modem. A format for the call is as follows:
______________________________________
MICA.sub.-- MODEM.sub.-- SetOption (
channelId.sub.-- str *channelIdPtr,
int16 command,
char *arg
______________________________________
The channelIdPtr parameter is the channel identifier for the modem to be modified. The command parameter is the configuration command, and the arg parameter is a pointer to the command parameter, if any. Possible result codes returned by the function call as follows:
______________________________________
MICA.sub.-- MODEM.sub.-- SUCCESS
The command was sent to the
modem.
MICA.sub.-- MODEM.sub.-- PARAM.sub.-- IN-
The parameter was invalid.
VALID
MICA.sub.-- MODEM CHAN.sub.-- INVALID
The channel was invalid.
______________________________________
The ISDN API 22 provides the interface between the host API 18 and ISDN processing 28. The function of the ISDN API 22 is to provide low-level function calls to the ISDN processor 44. Like the modem API 20, the ISDN API 22 also includes a number of function calls made by the host API 18. The host API 18 uses the ISDN API 22 to control and manipulate the ISDN processor 44. The ISDN API 22 provides a layer of abstraction between the host APII 18 and lower-level ISDN-board specific calls. Table 5 contains a list of the lower-level ISDN function calls.
TABLE 5
__________________________________________________________________________
ISDN API Function Call Summary
Call Type
Function Purpose
__________________________________________________________________________
Initialization
MICA.sub.-- ISDN.sub.-- Init ( )
Initialize the ISDN board.
MICA.sub.-- ISDN.sub.-- Initiate ( )
Open a data channel.
MICA.sub.-- ISDN.sub.-- Load ( )
Load the board's software.
MICA.sub.-- ISDN.sub.-- SetPath ( )
Route a call onto the MVIP line or the
PRI line.
MICA.sub.-- ISDN.sub.-- Start ( )
Starts the board.
MICA.sub.-- ISDN.sub.-- Status ( )
Retrieves ISDN board status.
Call Management
MICA.sub.-- ISDN.sub.-- Close ( )
Close a data channel.
MICA.sub.-- ISDN.sub.-- GetOption ( )
Performance.
MICA.sub.-- ISDN.sub.-- Reset ( )
Reset the IDSN board.
MICA.sub.-- ISDN.sub.-- SetOption ( )
Call Control Messages.
Data FIow
MICA.sub.-- ISDN.sub.-- Recv ( )
Receive ISDN Data.
MICA.sub.-- ISDN.sub.-- Send ( )
Send ISDN Data.
__________________________________________________________________________
A detailed description of each ISDN API function call follows. The MICA.sub.-- ISDN.sub.-- Init function call is used to initialize the ISDN board. A format for the function call is as follows:
______________________________________
MICA.sub.-- ISDN.sub.-- Init(
isdn.sub.-- str *isdnStr;
______________________________________
The isdnStr parameter points to the structure containing the board initialization information. The possible result codes returned by the function are as follows:
______________________________________
MICA.sub.-- ISDN.sub.-- Success
The board was initialized.
MICA.sub.-- ISDN.sub.-- Error
An error occurred.
______________________________________
The MICA.sub.-- ISDN.sub.-- Initiate function call is used to cause the ISDN board to originate or answer a call on a data channel. A format for the function call is as follows:
______________________________________
MICA.sub.-- ISDN.sub.-- Initiate(
channelId.sub.-- str *channelIdPtr
______________________________________
The channelIdPtr parameter is a pointer to the channel identification structure to identify the channel on which the call is to be originated or answered. The possible result codes that can be returned in response to the function are as follows:
______________________________________
MICA.sub.-- ISDN.sub.-- SUCCESS
The command was sent to the ISDN
board.
MICA.sub.-- ISDN.sub.-- PARAM.sub.-- IN-
The parameter was invalid.
VALID
MODEM.sub.-- CHAN.sub.-- INVALID
The channel was invalid.
______________________________________
The MICA.sub.-- ISDN.sub.-- Recv function is used to receive data from a specific ISDN channel. A format for the function call is as follows:
______________________________________
MICA.sub.-- ISDN.sub.-- Recv(
channel.sub.-- str *channelPtr,
char *dataBuffer,
int16 bufferSize
______________________________________
The channelPtr parameter identifies the channel to which the ISDN channel is assigned. The dataBuffer parameter identifies the buffer in which the data is located, and the bufferSize parameter indicates the maximum number of bytes that the buffer can hold. The result value of the function indicates the number of bytes actually received, or MICA.sub.-- ERROR can be returned if an error occurred during reception. The MICA.sub.-- ISDN.sub.-- Reset function is used to reset the ISDN board to a known state. A format for the function call is as follows:
______________________________________
MICA.sub.-- ISDN.sub.-- Reset (
isdn.sub.-- str *isdnStr
______________________________________
The ISDNStr parameter points to the structure containing the ISDN board information. The possible result codes are as follows:
______________________________________
MICA ISDN Success The board was reset.
MICA ISDN.sub.-- Error
An error occured.
______________________________________
The MICA ISDN.sub.-- SetOption function call is used to send call control messages to the ISDN board. A format for the function call is as follows:
______________________________________
MICA ISDN.sub.-- SetOption (
channel.sub.-- str *channelPtr,
int16 command,
char *arg
______________________________________
The channelPtr parameter identifies the channel carrying the telephone call. The command parameter is the command sent to the ISDN board, and the arg parameter points to a message structure or parameters used in the function, if any. The possible result codes are as follows:
______________________________________
MICA.sub.-- ISDN.sub.-- Success
The command was sent to the modem.
MICA.sub.-- ISDN.sub.-- Command.sub.-- In-
The parameter was invalid.
valid
MODEM.sub.-- Chan.sub.-- Invalid
The channel was invalid.
______________________________________
The MICA.sub.-- ISDN.sub.- SetPath function is used to route data onto the MVIP bus or onto the PRI line. A format for the function call is as follows:
______________________________________
MICA.sub.-- ISDN.sub.-- SetPath (
channel.sub.-- str *channelPtr,
isdn.sub.-- str *isdnStr
______________________________________
The channelPtr parameter points to the channel whose data is being routed. The isdnStr parameter points to the structure containing the board initialization information. Possible result codes are as follows:
______________________________________
MICA.sub.-- ISDN.sub.-- Success
The route was established.
MICA.sub.-- ISDN.sub.-- Error
An error occurred.
______________________________________
The MICA ISDN.sub.-- Send function call is used to send data to a specific ISDN channel. A format for the function call is as follows:
______________________________________
MICA ISDN.sub.-- Send (
channel.sub.-- str *channelPtr,
char *dataBuffer,
int16 bytes
______________________________________
The channelPtr parameter indicates the channel to which the ISDN channel is assigned. The dataBuffer parameter indicates the buffer in which the data is located, and the bytes parameter indicates the total number of bytes to be transmitted. It should be noted that data cannot be transmitted until the ISDN channel has entered the active state. The MICA.sub.-- ISDN CHANNEL.sub.-- Initiate function call causes the ISDN channel to transition to the active state. The ISDN channel's status may be verified by using the MICA.sub.-- ISDN CHANNEL--Status function call. The result returned in response to the function call is the number bytes actually transmitted. The MICA.sub.-- ISDN.sub.-- Status function call is used to retrieve status from an ISDN board. A format for the function call is as follows:
______________________________________
MICA.sub.-- ISDN.sub.-- Status (
channel.sub.-- str * channelPtr
int16 command
message.sub.-- str *messagePtr
______________________________________
The channelPtr parameter is used to identify the channel whose status is being examined. The command parameter is the status command, and the messagePtr parameter is a pointer to a message structure containing the call parameters. Possible result codes are as follows:
______________________________________
MICA.sub.-- ISDN.sub.-- Success
The command was sent to the modem.
MICA.sub.-- ISDN.sub.-- Command.sub.-- In-
The parameter was invalid.
valid
MODEM.sub.-- Chan.sub.-- Invalid
The channel was invalid.
______________________________________
The MICA.sub.-- ISDN.sub.-- Close function call is used to close a data channel. A format for the function call is as follows:
______________________________________
MICA.sub.-- ISDN.sub.-- Close (
channel.sub.-- str *channelPtr
______________________________________
The channelPtr parameter is used to identify the channel that is to be closed. It should be noted that prior to calling this function, the application should issue a ISDN.sub.-- Disable.sub.-- Data.sub.-- Channel control message. The possible result codes that can be returned in response to the MICA.sub.-- ISDN.sub.-- Close function are as follows:
______________________________________
MICA ISDN.sub.-- Closed
The channel was closed successfully.
MICA.sub.-- ISDN.sub.-- Chan.sub.-- Invalid
The channel parameter was invalid.
______________________________________
While this invention has been particulary shown and described with references to preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
|
Same subclass Same class Consider this |
||||||||||
