ThbTapiLine.MakeCall
Unit: hbTapi
 

The MakeCall function places a call on the line to the destination address specified in the DestAddr parameter. The CallParams property can be used to specify the parameters of the new call, e.g. the used address or the media mode.

Declaration

function MakeCall(DestAddr: String): ThbTapiCall;

Example

interface
uses hbTapi, tapi, ...

TForm1.Button1Click(Sender: TObject);
begin
  try
    hbTapiLine1.CallParams.MediaMode := LINEMEDIAMODE_INTERACTIVEVOICE; // interactive voice call
    hbTapiLine1.MakeCall(Edit1.Text); // phone number
  except
    on EhbTapiError do
      MessageDlg('MakeCall failed!' + E.Message, mtInformation, [mbOk], 0);
  end;
end;

Remarks

Please refer to the section "lineMakeCall" in TAPI's documentation for a more detailed information. This function works in an asynchronous manner. See the SyncMode property to read more about the handling of asynchronous functions.

Errors

Using this function may cause an EhbTapiError exception . Possible errors are:

LINEERR_ADDRESSBLOCKED, LINEERR_INVALLINEHANDLE, LINEERR_BEARERMODEUNAVAIL, LINEERR_INVALLINESTATE, LINEERR_CALLUNAVAIL, LINEERR_INVALMEDIAMODE, LINEERR_DIALBILLING, LINEERR_INVALPARAM, LINEERR_DIALDIALTONE, LINEERR_INVALPOINTER, LINEERR_DIALPROMPT, LINEERR_INVALRATE, LINEERR_DIALQUIET, LINEERR_NOMEM, LINEERR_INUSE, LINEERR_OPERATIONFAILED, LINEERR_INVALADDRESS, LINEERR_OPERATIONUNAVAIL, LINEERR_INVALADDRESSID, LINEERR_RATEUNAVAIL, LINEERR_INVALADDRESSMODE, LINEERR_RESOURCEUNAVAIL, LINEERR_INVALBEARERMODE, LINEERR_STRUCTURETOOSMALL, LINEERR_INVALCALLPARAMS, LINEERR_UNINITIALIZED, LINEERR_INVALCOUNTRYCODE, LINEERR_USERUSERINFOTOOBIG.

See Also

ThbTapiLine.MakeCall (2)