Help / WLanguage / WLanguage functions / Communication / Phone functions
  • Steps to follow
  • Handling an outgoing call
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Steps to follow
To manage the outgoing calls in a WINDEV application:
  1. Define (if necessary) the TAPI device on which the calls must be dialed. Use the functions:
    tapiCapabilityReturns the characteristics of a telephony device.
    tapiDeviceSelects the TAPI device that will be used during the following telephony operations:
    tapiDeviceListLists the TAPI 2.0 and TAPI 3.1 compatible devices installed on the current computer.
  2. Dial the phone number via the modem (tapiDial).
  3. This function calls a specific WLanguage procedure used to manage the progress of the call. In this procedure, the following variables enable you to find out the status of the line:
    • tapiLineBusy: The line is currently busy.
    • tapiLineConnected: The line is connected
    • tapiLineDialing: Dialing in progress
    • tapiLineDialTone: The line gets a dial tone
    • tapiLineDisconnected: The correspondent has hung up
    • tapiLineProceeding: The call is dialed: searching for the correspondent
    • tapiLineRingBack: Ringing in progress
  4. Pick up the phone receiver to communicate.
  5. During the communication, the WLanguage functions for handling the call can be used (see below). There is no need to specify the identifier of the call because the call processed will be the current call (which means the outgoing call).
  6. At the end of the call, close the line with tapiHangUp.
  7. Hang up the phone receiver.
Handling an outgoing call
The following operations can be performed on the outgoing calls:
  • finding out the characteristics of the outgoing call:
    tapiCallDuringReturns the duration of the call (difference between the start date and time of call and the end date and time of call).
    tapiCalledIDUsed to find out the phone number called.
    tapiCallEndReturns the date and time of the end of call.
    tapiCallerIDUsed to find out the calling phone number (the one that calls).
    tapiCallIsBusyUsed to find out whether the number called is busy.
    tapiCallIsOverUsed to find out whether the incoming or outgoing call is ended.
    tapiCallStartReturns the date and time of the beginning of call (incoming or outgoing call).
    tapiNoAnswerUsed to find out whether an answer was given to the call.
  • perform specific operations:
    tapiKeyPressedReturns the history of the keys pressed on the phone keypad since the last call to tapiKeyPressed.
    tapiPlayPlays a sound file (.WAV) for the specified line.
    tapiRecordRecords the current communication as a".WAV" file.
    tapiSendKeyAllows you to simulate the use of phone keys.
    tapiStopStops reading a pre-recorded message (tapiPlay).
Related Examples:
WD Telephony Complete examples (WINDEV): WD Telephony
[ + ] This example presents the telephony functions of WINDEV.
The following topics are presented in this example:
1/ How to dial a phone number
2/ Detect and identify the incoming calls
Summary of the example supplied with WINDEV:
This example presents the telephony functions supplied with WINDEV. Once contacts have been entered in the main window (the table is in edit), you will be able to call them from the application directly (your computer must be equipped with a modem properly installed). You will be able to get a notification for the incoming calls and to identify the caller
Minimum version required
  • Version 9
This page is also available for…
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help