- Limitation
- WLanguage procedure
- Required configuration
tapiListen (Function) In french: telDémarreDétectionAppel Starts the call detection (also called "call monitoring service").
// Starts the service for call detection IF tapiListen("IncomingCall", tapiOptionMediaModeFax, "CallDetection") = True THEN // The service for call detection is started Message("Call detection enabled") ELSE // The service for call detection is not started Error("Unable to start the call detection" + CR + ... "Error details:"+ CR + ErrorInfo(errMessage)) END
Syntax
<Result> = tapiListen(<Service identifier> [, <Options>] , <Procedure name> , <Custom parameter>)
<Result>: Boolean - True if the call detection is enabled,
- False otherwise.
<Service identifier>: Character string (with quotes) 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. | tapiOptionMonitor | Detects the calls (to perform statistics for example), even if they are managed by an application. No operation will be possible on the call. | tapiOptionMediaModeVoice | Detects the voice calls. Remark: The Fax modems that allow auto-dialing may return this constant. In this case, a WLanguage error will occur. | tapiOptionMediaModeUnknown | Detects the unknown types of calls. | tapiOptionMediaModeFax | Detects the calls coming from a fax. |
<Procedure name>: Character string (with or without quotes) 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>)
- <Service identifier>: identifier of service that detected the call
- <Call identifier>: integer that identifies the call. Can be used in all the functions for handling the call.
- <Call status>: integer that can take the following values:
| | tapiLineBusy | The line is currently busy. | tapiLineConnected | The line is connected. | tapiLineDialing | Dialing in progress. Remark: If TAPI 3.1 technology is used, this constant is no longer returned. | 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. | tapiNewCall | New call detected waiting for an answer or for a reject. | tapiCallInformation | The additional information (presentation of the number) is available. In most cases, this information will be available after the fist ring. | tapiMonitoredDigit | A phone key has been used. To find out the list of keys used, call tapiKeyPressed. |
- <Parameter> is the custom parameter passed to tapiListen.
Caution: this procedure must contain no call to the debugger (no breakpoint, no STOP keyword, no auto-stop expression, ...). <Custom parameter>: Any type Parameter passed to the WLanguage procedure. Remarks tapiListen cannot be called in the procedure for call detection. The WLanguage procedure is run in a WLanguage thread. Caution: The following processes cannot be run in the threads: - use tapiDial, tapiLineDial, tapiListen, tapiStopCallDetection, tapiHold, tapiSendKey, tapiDevice, tapiHangUp, tapiAnswerCall, tapiUnhold and tapiBlindTransfer.
- opening windows with WLanguage functions such as Open, Use, Close, ... A specific management mode must be implemented if some windows must be handled in threads (rare case). See Managing the opening of a window in a secondary thread for more details
- managing events.
- managing timers.
This page is also available for…
|
|
|