Avaya Logo

Previous Topic

Next Topic

Book Contents

Book Index

Application framework

A well-written IRAPI application must be event-driven rather than procedural. Most IRAPI functions are non-blocking functions. Those that implement voice or telephony functions, for example, initiate the specified action and return immediately. The application must then wait for an event generated by the IRAPI for status or completion information for the initiated action. State information should be maintained for each channel handled by the application. This information determines the step to perform after receiving an IRAPI event.

In general, a well designed IRAPI application has the following components:

Following a discussion of each application component is an implementation of each task using the chantest.c code. The chantest application prompts for and collects touch tones. After receiving four touch tones, it plays back the touch tones collected. This behavior is repeated until four zeros (0000) are entered to terminate the application.

In This Section

Process initialization

Application initialization

Application execution

Process termination

© 2006 Avaya Inc. All Rights Reserved.