Dials a phone number for a voice line.
: By default, the device used is 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.
: With a PABX application, each line appears as a device. Therefore, to dial on a phone line, you must:
- Choose the current phone line (tapiDevice).
- Number (tapiDial).
To do so, use the tapiLineDial
Remark: Depending on the operating system and on the modem driver, a window for call management may be displayed when using tapiDial. This window is used to automatically end the current call.
IF tapiDial(EDT_PhoneNumber, "LineStatus")=True THEN
Info("Click OK to hang up")
PROCEDURE TestLineStatus(ValueLineStatus is int)
CASE tapiLineBusy: Message("The line is busy")
CASE tapiLineConnected: Message("OK, connected")
CASE tapiLineDialing: Message("Dialing in progress")
CASE tapiLineDialTone: Message("Dial tone")
CASE tapiLineDisconnected: Message("The correspondent has hung up")
CASE tapiLineProceeding: Message("Searching for your correspondent")
CASE tapiLineRingBack: Message("Ringing")
<Result> = tapiDial(<Number to dial> [, <WLanguage procedure> [, <Duration> [, <Custom parameter>]]])
- True if the line is opened: you can pick up the receiver and talk,
- False otherwise. To get more details on the error, use tapiError.
<Number to dial>: Character string
Phone number to dial. To specify a prefix (0 for an external line for example), use a comma in the number. For example: "0,0467789066".
<WLanguage procedure>: Name of optional procedure
Name of WLanguage procedure used to manage the progress of dialing. This procedure has the following format:
PROCEDURE <Procedure name> (<Line status>, <Parameter>)
The first procedure parameter (<Line status>) is an integer that can take the following values:
The second procedure parameter (<Parameter>) is the custom parameter passed to tapiDial.
|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.|
Caution: This procedure must not contain any call to the debugger (no breakpoint, no STOP keyword, no auto-stop expression, etc.).
<Duration>: Optional integer or optional Duration
Maximum wait duration (in seconds). When this timeout is exceeded, the function assumes that there is no response (nobody picked up).
This parameter can correspond to:
- an integer corresponding to the number of seconds,
- a Duration variable,
- the duration in a readable format (e.g., 1 s or 10 ms).
<Custom parameter>: Any type, optional
Parameter passed to the WLanguage procedure.
Differences between tapiDial and tapiLineDial
- tapiDial is used in the context of a single outgoing call. The identifier of this call is not available.
- tapiLineDial is used in a context where there may be several simultaneous calls. tapiLineDial returns the call identifier. Therefore, it can be easily handled (to transfer a call for example).
cannot be called in the procedure for call detection (defined by tapiListen
Telephony functions use TAPI 2.0 technology and/or TAPI 3.1 technology. These technologies can be used on all systems.