contents.gifindex.gifprev1.gifnext1.gif

Sample programs

Two sample programs are included with ActiveAG. Both of these are written in Visual Basic (using v5.0 Enterprise Edition). This section briefly describes these sample programs.

Note: Sample programs for other languages (C++ and Delphi) are currently under construction. See the Where to get support topic to learn where to find these when they become available.

SoundRecorder

The first sample program is named SoundRecorder. When SoundRecorder is started, it opens the first AG line in the system (first port on the first card) and waits for incoming calls. When you call that port, SoundRecorders RECORD button will become active and you will be able to record a message. Recoding ends a few seconds after you stop speaking. You may then save the recording using File/Save menu option.

If you dont want to record a message, you can load a message from a file that was recorded earlier using the File/Open menu option. Once a message has been loaded from a file, or recorded from the phone line, the PLAY button on SoundRecorder will become active and you will be able to hear the recorded audio played back to you.

The Properties menu option allows you to select the audio type to use for playing and recording messages. (See the Supported voice data formats topic.) These options set the appropriate ActiveAG properties as necessary. SoundRecorder will give you an introduction to the audio capabilities in ActiveAG and also introduces you to using asynchronous methods.

FaxReceive

The second sample program is FaxReceive. This program illustrates how to use the fax features in ActiveAG. What FaxReceive does is pretty simple: it simply waits for a fax transmission on the first AG port in the system.

When an incoming call is determined to be a fax transmission, the fax is received and saved to a file. When the fax transmission ends, an image of it is displayed. When a subsequent fax transmission is received, then the image of it will be displayed.

FaxReceive will introduce you to using the fax methods in ActiveAG.