ThbTapiLine.Pickup
Unit: hbTapi
 

The Pickup method picks up a call alerting at the specified destination address and returns a call for the picked-up call. If invoked with an empty string for the DestAddress parameter, a group pickup is performed. If required by the device, GroupID specifies the group identifier to which the alerting station belongs. Use the OnAddressState event and check the Address.Status.AddressFeatures property to determine if a pickup is possible.

Declaration

function Pickup(AddressID: DWORD; DestAddress, GroupID: String): ThbTapiCall;

Example

interface
uses hbTapi, tapi, ...

procedure TForm1.Button1Click(Sender: TObject);
begin
  try
    FPickUpCall := hbTapiLine1.Pickup(0, '', 0);
  except
    on E:EhbTapiError do
      ListBox1.Items.Add(Format('Group Pickup failed! %s', [E.Message]));
  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_INVALADDRESS, LINEERR_NOMEM, LINEERR_INVALADDRESSID, LINEERR_OPERATIONUNAVAIL, LINEERR_INVALGROUPID, LINEERR_OPERATIONFAILED, LINEERR_INVALLINEHANDLE, LINEERR_RESOURCEUNAVAIL, LINEERR_INVALPOINTER, LINEERR_UNINITIALIZED.

See Also

ThbTapiLine.OnAddressState, ThbTapiLine.Addesse[<any available>].Status.AddressFeatures