SDK samples
The Diva Server SDK contains a number of useful sample programs. Some of these can be used as test tools (to test various SDK and card functions), while others just offer "how to" knowledge for would-be developers. The following describes the C and C++ examples bundled with the SDK:
 C++ Samples
These are GUI (MFC) applications written in C++ for Win32 platform. Ready-compiled versions of these applications exist in the SDK "bin" directory, so you can run these without any knowledge of programming or the Microsoft Visual C++ tools.
 Conference (a.k.a.ConferenceSimple)
Connects incoming voice calls to the same conference. Automatic or manual connection or disconnection from the conference is possible. You can stream a WAV file to one or all members of the conference.
 Data
Makes or receives data connections. You can select different protocols (modem, digital 64k, V.120, V.110), and manually or automatically send data packets. You can also echo incoming data back to the sender.
 FaxIn
Test program for receiving faxes. Supports TIF or SFF files, and also can be used to test fax-on-demand.
 FaxOut
Test program for sending faxes. Fax files are picked up from a directory of your choice. The program the filenames and telephone numbers from a job file.
 LIConf
Line Interconnect example. Interconnects two incoming calls. You can then stream a WAV file to both calls, and you can also monitor the interconnected calls via the soundcard.
 VoiceExt1
Answering machine example. Picks up incoming calls, plays a message and records a message from the caller.
 VoiceExt2
PBX/Voicemail example. Picks up incoming calls, and then attempts to transfer the call (blind transfer) to an extension number dialed by the caller. If this fails, the caller is invited to leave a voicemail message.
ConferenceEx
Like ConferenceSimple but with extra code to test conference properties).
MS_Speech
Example of Microsoft Speech SDK (SAPI) used with Diva Server. Demonstrates how you can use the DSSDK ‘Audio Provider’ feature with TTS and ASR engines.
FaxMultiThreads
 An example that handles multiple concurrent faxes, using one thread per active call.Â
Â
C Samples
These are command-line examples for Win32 platform. They are simple programs that allow the SDK user to very easily see the program flow, and therefore how things are done using the SDK.
 FaxInSimple
The sample shows how to answer an incoming call and to receive a fax. The received fax is stored in the file RxFax.Tif, and any existing file will be overwritten. For each page information is printed.
The sample application is started from the command line. To terminate the application press ENTER.
 FaxOutSimple
Sample for an outgoing call and sending a fax document. The sample shows how to connect a single call, to send a fax and to disconnect. For every page a message is printed. The sample is started from the command prompt. The phone number to dial and the file to send must be specified as parameters.
 VoiceInSimple
Sample for a simple answering machine processing one call. The sample shows how to answer a single call, to stream a message and to record a message. The sample is started from the command prompt. It answers any incoming call and streams an audio file and records the answer. The answer is limited to 20 seconds or 5 seconds of silence. The application is terminated by pressing any key.
 VoiceOnLeasedLine
Sample for an outgoing call on a leased line including streaming a file. The sample shows how to connect or answer a single call on a leased line, to stream a file in originator mode or to record a file in answer mode and to disconnect. The sample is started from the command prompt. The channel to use and the file to stream must be specified as parameters.
 VoiceOutSimple
Sample for an outgoing call including streaming a file. The sample shows how to connect a single call, to stream a message and to disconnect. The sample is started from the command prompt. The phone number to dial and the file to stream must be specified as parameters.
 AudioMonitor
Passive call tapping example, records audio to a stereo WAV file. Captures called and calling digits, and call status information.
 AudioMonitorRxStream
Passive call tapping, captures audio stream to memory.
 AudioMonitorSingleRecording
Passive call tapping, captures audio as two separate WAV files for caller and callee.
 MessageWaiting
Demonstrates the use of message waiting indicator (MWI) supplementary service.
 ShowDeviceStatus
Demonstrates processing of layer 1 events in SDK app.
 ShowDeviceStatusEvents
Processing of layer 1 events, with asynchronous indication of status changes via events.
 SimpleVoIPGateway
Trombones two calls together, one call via Diva Server hardware, one via Diva Server SoftIP. Demonstrates simple IP/telephony gateway functionality.
 SMSServiceCenter
Example showing how to implement SMS-to-fixed using Diva Server.
 X25SingleCall
Demonstrates X25 over a B channel for X25 data applications.Â