ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / Phone functions
  • Limitation
  • WLanguage procedure
  • Required configuration
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
tapiListen (Function)
In french: telDémarreDétectionAppel
Starts the call detection (also called "call monitoring service").
WINDEV Note By default, the device used is automatically the first TAPI 3.1-compatible device found. A specific device can be selected by tapiDevice. In this case, this specific device will be used.
// Démarre le service de détection des appels
IF tapiListen("AppelEntrant", tapiOptionMediaModeFax, "DetectionAppel") = True THEN
	// Le service de détection des appels a démarré
	Message("Détection des appels activée")
ELSE
	// Le service de détection des appels n'a pas démarré
	Error("Impossible de démarrer la détection des appels" + CR + "Détail de l'erreur :"+ CR + ErrorInfo(errMessage))
END
Syntax
<Result> = tapiListen(<Service identifier> [, <Options>] , <WLanguage procedure> , <Custom parameter>)
<Result>: Boolean
  • True if the call detection is enabled,
  • False otherwise.
<Service identifier>: Character string
Name used to identify the service for call detection.
<Options>: Optional constant
Characteristics of call detection:
tapiOptionDefault
(default option)
Detecting calls on a fax modem. In most cases, the functions for handling calls are not supported by the modems.
This option cannot be used with the other options.
tapiOptionMediaModeFaxDetects the calls coming from a fax.
tapiOptionMediaModeUnknownDetects the unknown types of calls.
tapiOptionMediaModeVoiceDetects the voice calls.
Note: Fax modems with automation dialing can return this constant. In this case, a WLanguage error will occur.
tapiOptionMonitorDetects the calls (to perform statistics for example), even if they are managed by an application. No operation will be possible on the call.
<WLanguage procedure>: Procedure name
Name of WLanguage procedure called during a call detection or when the call status changes. This procedure has the following format:
PROCEDURE <Procedure name> (<Service identifier>, <Call identifier>,
<Call status>, <Parameter>)
  • <Identifiant du service> identifier of the service that detected the call
  • <Call Identifier>: integer identifying the call. Can be used in all the functions for handling the call.
  • <Call Status>: integer that can take the following values:
    tapiCallInformationThe additional information (presentation of the number) is available. In most cases, this information will be available after the fist ring.
    tapiLineBusyThe line is currently busy.
    tapiLineConnectedThe line is connected.
    tapiLineDialingDialing in progress.
    Note: If TAPI 3.1 technology is used, this constant is no longer returned.
    tapiLineDialToneThe line gets a dial tone.
    tapiLineDisconnectedThe correspondent has hung up.
    tapiLineProceedingThe call is dialed: looking for the person called.
    tapiLineRingBackRinging in progress.
    tapiMonitoredDigitA phone key has been used. To find out the list of keys used, call tapiKeyPressed.
    tapiNewCallNew call detected waiting for an answer or for a reject.
  • <Parameter> is the custom parameter passed to tapiListen.
Warning: this procedure must not contain any calls to the debugger (no breakpoints, no STOP keyword, no auto-stop expression, etc.).
<Custom parameter>: Any type
Parameter passed to the WLanguage procedure.
Remarks

Limitation

tapiListen cannot be called in the call detection procedure.

WLanguage procedure

The WLanguage procedure is run in a WLanguage thread.
Please note: the following processes cannot be run in threads:
For more details on threads, see Managing threads.

Required configuration

Telephony functions use TAPI 2.0 technology and/or TAPI 3.1 technology. These technologies can be used on all systems.
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
Component: wd300com.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help