Version
Chapter 1
Introduction
1.1 Introduction
1.2 CDI Service Functionality
1.2.1 CDI Service Call Control
1.2.2 CDI Service Board Management and Monitoring
1.3 The CDI Service and CT Access
1.3.1 CT Access Services
1.3.2 CTA Contexts and Event Queues
1.3.3 CT Access Programming Model
1.3.4 Managing Parameters in CT Access
1.1 Introduction
The
CDI Service Developer's Reference Manual
explains how to develop an application using the CDI service within the CT Access environment. The CDI service is a device service for the CX 2000 family of station interface boards. It allows access to station call control and board management functions.
This manual defines telephony terms where applicable, but assumes that the reader is familiar with telephony concepts. It also assumes that the user is familiar with the C programming language.
Read the
CT Access Developer's Reference Manual
before using this manual. The
CT Access Developer's Reference Manual
contains detailed information concerning CT Access concepts, architecture, and application development. This information must be fully understood before you use the CDI service with CT Access.
1.2 CDI Service Functionality
The CDI service provides the following functionality for CX 2000 products:
Station call control
Board management and monitoring
The CDI service supports the CX 2000 board family only. Refer to the
CX 2000 and CX 2000C Installation and Developer's Manual
for more information on the CX 2000 and CX 2000C boards.
1.2.1 CDI Service Call Control
Using the CDI service, an application can access and perform basic call control operations on CX 2000 and CX 2000C boards. These functions include:
Tone generation
DTMF detection
Signaling (on-hook, off-hook, flash-hook, ringing)
On-board timers
1.2.2 CDI Service Board Management and Monitoring
The CDI service provides the following board management and monitoring functions:
Temperature monitoring
Telco power detection
Station module detection
1.3 The CDI Service and CT Access
CT Access
is a development environment providing standard programming interfaces for telephony functions that are hardware-independent. You must have CT Access installed on your system to build applications using the CDI service. This section provides background information about CT Access, and describes how the CDI service fits into the CT Access environment. For detailed information about CT Access, see the
CT Access Developer's Reference Manual
.
1.3.1 CT Access Services
A CT Access
service
is a group of logically related telephony functions. The CDI service is a CT Access device service that provides station call control-related functions for CX 2000 products (see
Figure 1
). Other services address other aspects of a telephony application. For example, the Switching service controls circuit switching; the NaturalFax service provides fax functionality.
Figure 1. CT Access and the CDI Service
1.3.2 CTA Contexts and Event Queues
CT Access organizes services and accompanying resources around a single processing context. A
CTA context
usually represents an application instance controlling a single telephone call.
CT Access provides multi-processing support. Multiple CT Access application processes can perform tasks on behalf of the same CT Access context (referred to as
context sharing
). CT Access applications can transfer control of CT Access contexts (for example, contexts associated with individual telephone calls) to other CT Access applications (referred to as
context hand-off
).
An
event queue
is the communication path from a CT Access service to an application. A CT Access service generates events indicating certain conditions or state changes and sends them to applications via the event queue.
1.3.3 CT Access Programming Model
CT Access employs an
asynchronous programming model
in order to take advantage of concurrent processing. When called, most functions return immediately, indicating the operation was initiated. The application may then call other functions while CT Access is processing the command.
There are two types of functions in CT Access: synchronous and asynchronous.
Synchronous
functions indicate completion by sending a return value. The return value may be either
SUCCESS
or an error code. All CDI service functions are
synchronous
.
For
asynchronous
functions, if the return value is
SUCCESS
, the function has been successfully initiated, and the execution result will arrive later via an event. If the return code is not
SUCCESS
, the function was never initiated; therefore, no subsequent events associated with the function will be generated.
During the function execution, events are generated indicating the occurrence of certain conditions or state changes. If an asynchronous function fails after being initiated, CT Access delivers a
DONE
event to the application and the event
value
field contains an error code.
Appendix A
contains a complete list of CDI service errors.
Appendix B
contains a complete list of CDI service events.
1.3.4 Managing Parameters in CT Access
The characteristics of CT Access services can be altered by modifying associated parameters. Most CDI service parameter structures have default values that are sufficient for most configurations.
CT Access manages parameters for services on a CTA context basis. The CTA context maintains a copy of the parameters for all services opened on the context.
The following CT Access functions allow you to obtain or change parameter information:
Function
Description
ctaGetParmByName
Retrieves a single field for a given parameter name.
ctaSetParmByName
Modifies a single field for a given parameter name.
ctaGetParmID
Retrieves the parameter ID for a given parameter descriptor name.
ctaGetParmInfo
Retrieves a parameter field definition.
ctaGetParms
Returns parameter values for a given parameter structure.
ctaRefreshParms
Resets the values of all context parameters on a CTA context to the global defaults.
Refer to the
CT Access Developer's Reference Manual
for information about the parameter functions. Refer to
Appendix C
for detailed descriptions of CDI service function parameters
.
Version
Want to send us feedback on our documentation? Email:
Tech_Pubs@nmss.com
Copyright © 2000, Natural MicroSystems, Inc. All rights reserved.