ThbTapiCallParams
Unit: hbTapi 

If you need more control of the TAPI line features, you are able to use the methods of ThbTapiLine instead of ThbTapiCall or use the TAPI functions directly. Some of them require a PLINECALLPARAMS parameter. The ThbTapiCallParams object helps you building the needed TAPI structure (LINECALLPARAMS). Please notice that the property ThbTapiLine.CallParams is derived from ThbTapiCallParams an can be used as a ThbTapiCallParams instance also.

The properties of ThbTapiCallParams are:

AddressID
AddressMode
BlockID
CalledParty
CallingPartyID
BearerMode
Comment
DialParams
DisplayableAddress
Flags
MaxRate
MediaMode
MinRate
NoAnswerTimeout
OrigAddress
TapiData
TargetAddress
UserUserInfo

ThbTapiCallParams is used in four steps:

  1. Create an instance of ThbTapiCallParams
  2. Set the needed properties
  3. Pass the TapiData property as PLINECALLPARAMS to the method
  4. Free the instance

procedure TForm1.DoMakeCall(Sender: TObject);
var cp: ThbTapiCallParams;
begin
  cp := ThbTapiCallParams.Create;
  try
    cp.AddressMode := LINEADDRESSMODE_DIALABLEADDR;
    cp.MediaMode   := LINEMEDIAMODE_DATAMODEM;
    cp.MaxRate     := 14400;
    cp.MinRate     := 9600;
    hbTapiLine1.MakeCall(Edit1.Text, 0, cp.TapiData);
  finally
    cp.Free;
  end;
end;

// or use the line's CallParams property

procedure TForm1.DoMakeCall(Sender: TObject);
begin
  try
    hbTapiLine1.MakeCall(Edit1.Text, 0, hbTapiLine1.CallParams.TapiData);
  except
  end;
end;

Availablity

Design-Time: None / Run-Time: Read, Write

Declaration

ThbTapiCallParams = class(TPersistent);

Remraks

Please refer to the section "LINECALLPARAMS" in TAPI's documentation for a more detailed information.

See Also

ThbTapiLine.MakeCall, ThbTapiLine.SetupTransfer, ThbTapiLine.SetupConference


AddressID (DWord)

TCorresponds to the dwAddressID member of the LINECALLPARAMS structure. This property indicates the address that is used when a call is created.. See the ThbTapiLine.Addresses property for a list of available addresses for the TAPI line device. Legal values range from 0 to ThbTapiLine.Addresses.Count - 1. This parameter is used only if the AddressMode property is set to LINEADDRESSMODE_ADDRESSID (default).

AddressMode (DWord)

Corresponds to the dwAddressMode member of the LINECALLPARAMS structure. This is the mode by which the originating address is specified. This property uses one of the LINEADDRESSMODE_ constants.

Constant

Meaning

LINEADDRESSMODE_ADDRESSID

The address is specified with a small integer in the range 0 to NumAddresses minus one, where NumAddresses is the value in the line's device capabilities.

LINEADDRESSMODE_DIALABLEADDR

The address is specified through its phone number.

 

BearerMode (DWord)

Corresponds to the dwBearerMode member of the LINECALLPARAMS structure.This propery indicates the BearerMode to be used when a call is created. The default value is LINEBEARERMODE_VOICE. See the property ThbTapiLine.Caps.BearerModes for available BearerModes for this TAPI line device.

Constant

Meaning

LINEBEARERMODE_VOICE

This is a regular 3.1 kHz analog voice-grade bearer service. Bit integrity is not assured. Voice can support fax and modem media types.

LINEBEARERMODE_SPEECH

This corresponds to G.711 speech transmission on the call. The network can use processing techniques such as analog transmission, echo cancellation, and compression/decompression. Bit integrity is not assured. Speech is not intended to support fax and modem media types.

LINEBEARERMODE_MULTIUSE

The multiuse mode defined by ISDN.

LINEBEARERMODE_DATA

The unrestricted data transfer on the call. The data rate is specified separately.

LINEBEARERMODE_ALTSPEECHDATA

The alternate transfer of speech or unrestricted data on the same call (ISDN).

LINEBEARERMODE_NONCALLSIGNALING

This corresponds to a non-call-associated signaling connection from the application to the service provider or switch (treated as a media stream by TAPI).

LINEBEARERMODE_PASSTHROUGH

When a call is active in LINEBEARERMODE_PASSTHROUGH, the service provider gives direct access to the attached hardware for control by the application. This mode is used primarily by applications desiring temporary direct control over asynchronous modems, accessed through the Win32 comm functions, for the purpose of configuring or using special features not otherwise supported by the service provider.

LINEBEARERMODE_RESTRICTEDDATA

Bearer service for digital data in which only the low-order seven bits of each octet may contain user data (for example, for Switched 56kbit/s service).

BlockID (Boolean)

Corresponds to the dwCallParamFlags member of the LINECALLPARAMS structure. This propery indicates if the originator identity should be concealed (block caller ID).

CalledParty (String)

Corresponds to the dwCalledPartySize and dwCalledPartyOffset members of the LINECALLPARAMS structure.This information can be specified by the application that makes the call and is made available in the call's information structure for logging purposes.

CallingPartyID (String)

Corresponds to the dwCalleingPartyIDSize and dwCallingPartyOffset members of the LINECALLPARAMS structure that specifies the identity of the party placing the call. If the content of the identifier is acceptable and a path is available, the service provider passes the identifier along to the called party to indicate the identity of the calling party.

Comment (String)

Corresponds to the dwCommentSize and dwCommentOffset members of the LINECALLPARAMS structure.This information can be specified by the application that makes the call and is made available in the call's information structure for logging purposes.

DialParams

Corresponds to the DialParams member of the LINECALLPARAMS structure. The DialParams specifies a collection of dialing-related fields.

DialPause

The duration, in milliseconds, of a comma in the dialable address.

DialSpeed

The interdigit time period, in milliseconds, between successive digits.

DigitDuration

The duration, in milliseconds, of a digit.

WaitForDialtone

The maximum amount of time to wait for a dial tone when a 'W' is used in the dialable address.

When a value of 0 is specified for a field, the default value for that field is used. If a nonzero value is specified for a field that is outside the range specified by the corresponding fields in MinDialParams and MaxDialParams in the ThbTapiLine.Caps (LINEDEVCAPS) structure, the nearest value within the valid range is used instead.

Example

DialParams.WaitForDialtone := 3000;
// wait 3 seconds for a dialtone if a 'W' is used in the dialable address

DisplayableAddress (String)

Corresponds to dwDisplayableAddressSize and dwDisplayableAddressOffset. The displayable string is used for logging purposes.

ThbTapiCallParams.Flags

Type: DWORD (Cardinal)

Corresponds to dwCallParamFlags.This is a set of bit flags which uses the LINECALLPARAMFLAGS_ constants:

Constant

Meaning

LINECALLPARAMFLAGS_BLOCKID

The originator identity should be concealed (block caller ID). Use this bit flag to block the CallerID information from being send to the remote party when making calls.

Remarks: See the ThbTapiLine.Caps.Flags property to read how this feature will work on the selected line device.

LINECALLPARAMFLAGS_DESTOFFHOOK

The called party's phone should be automatically taken offhook.

LINECALLPARAMFLAGS_IDLE

The call should be originated on an idle call appearance and not join a call in progress.

LINECALLPARAMFLAGS_NOHOLDCONFERENCE

This bit is used only in conjunction with lineSetupConference and linePrepareAddToConference. These functions are not supported by ThbTapiLine yet. But you are able to call the TAPI function directly.

LINECALLPARAMFLAGS_ONESTEPTRANSFER

This bit is used only in conjunction with the ThbTapiCall.SetupTransfer method (TAPI: lineSetupTransfer).

LINECALLPARAMFLAGS_ORIGOFFHOOK

The originator's phone should be automatically taken offhook.

LINECALLPARAMFLAGS_PREDICTIVEDIAL

This bit is used only when placing a call on an address with predictive dialing capability.

LINECALLPARAMFLAGS_SECURE

The call should be set up as secure.

MaxRate (DWord)

Corresponds to the dwMaxRate member of the LINECALLPARAMS structure. This is the maximum data rate range requested for the call's data stream in bps (bits per second). When making a call, the service provider attempts to provide the highest available rate in the requested range. If a specific data rate is required, both min and max should be set to that value. If MaxRate is zero, the default value is as specified by the MaxRate member of the ThbTapiLine.Caps property. This is the maximum rate supported by the device.

MinRate (DWord)

Corresponds to the dwMinRate member of the LINECALLPARAMS structure.This is the minimum data rate range requested for the call's data stream in bps (bits per second). When making a call, the service provider attempts to provide the highest available rate in the requested range. If a specific data rate is required, both min and max should be set to that value. If MaxRate is zero, the default value is as specified by the MaxRate member of the ThbTapiLine.Caps property. This is the maximum rate supported by the device.

MediaMode (DWord)

Corresponds to the dwMediaMode member of the LINECALLPARAMS structure.This propery indicates the MediaMode which is used when a call is created. The default value is LINEMEDIAMODE_INTERACTIVEVOICE. See the property ThbTapiLine.Caps.MediaModes for the available media modes for the selected line device.

OrigAddress (String)

Corresponds to the dwOrigAddressSize and dwOrigAddressOffset members of the LINECALLPARAMS structure.This is the Name of the oroginating address that is used when a call is created on the line device. This value is used only if the AddressMode parameter is set to LINEADDRESSMODE_DIALABLEADDR.

TapiData (PLINECALLPARAMS)

Pointer to the LINECALLPARAMS structure containing the defined information. This value can be passed to ThbTapiLine methods and TAPI functions.

TargetAddress (String)

Corresponds to the dwTargetAddressSize and dwTargetAddressOffset members of the LINECALLPARAMS structure. Used value in the case of certain automatic actions. In the case of predictive dialing, specifies the address to which the call should be automatically transferred. This is essentially the same string that would be passed to ThbTapiCall.BlindTransfer (lineBlindTransfer) if automatic transfer were not being used. Set to zero if automatic transfer is not desired. In the case of a No Hold Conference, specifies the address that should be conferenced to the call. In the case of a One Step Transfer, specifies the address to dial on the consultation call.

NoAnswerTimeout (DWord)

Corresponds to the dwNoAnswerTimeout member of the LINECALLPARAMS structure.This is the number of seconds, after the completion of dialing, that the call should be allowed to wait in the PROCEEDING or RINGBACK states, before it is automatically abandoned by the service provider with a LINECALLSTATE_DISCONNECTED and LINEDISCONNECTMODE_NOANSWER. A value of 0 indicates that the application does not desire automatic call abandonment.

UserUserInfo (String)

Corresponds to the dwUserUserInfo and dwOrigUserUserInfo members of the LINECALLPARAMS structure holding user-user information.