Establish a Conference Call
 

In TAPI, there are two ways to establish a telephone conference call.

Initiate a call transfer and resolve it as a conference, all three parties enter into a conference call.

Use the call's SetupTransfer method to initiatialize a call transfer. When the consultation call has reached the dialtone call state (typically the initial state of a consultation call), the application can proceed by dialing the destination address and tracking its progress.

While the consultation call exists, the original call typically transitions to the OnHoldPendingTransfer state. The application may be able to toggle between the consultation call and the original call by using SwapHold. A consultation call can be canceled by invoking it's Drop method. After dropping a consultation call, the original call typically transitions back to the connected state. If the call state of the original call is OnHoldPendingTransfer, the Unhold function can be used to recover the call. In this case, the call state of the consultation call is set to idle.

Once the consultation call transitions to the connected state, the transfer request can be resolved either as a transfer or as a three-way conference call. Use the primary call's CompleteTransfer method to establish the conference call.

procedure TForm1.DoConferecne(Call: ThbTapiCall);
var ConsultCall: ThbTapiCall;
begin
  try
    ConsultCall := Call.SetupTransfer;
    ConsultCall.Dial('1234');
    ConsultCall.Notes['Action'] := 'Conference';
  except
  end;
end;

procedure TForm1.hbTapiLine1Connected(Sender: ThbTapiLine; Call: ThbTapiCall);
begin
  if (Call.Notes['Action'] = 'Conference') then
  try
    Call.CompleteTransfer(True);
  except
  end;
end;

Setup a conference call for the addition of the third party and add the consultation call to the conference call.

Use the SetupConference method to set up a conference call for the addition of a third party. A conference call is created and holds the primary call as it's member. A consultation call is created too and can be used to dial the destination party's phone number.

Once the consultation call transitions to the connected state, the process can be resolved as a a three-way conference call. Use the consultation call's AddToConference method to add it to the existing conference call.

procedure TForm1.DoConferecne(Call: ThbTapiCall);
var ConsultCall: ThbTapiCall;
begin
  try
    ConsultCall := Call.SetupConference;
    ConsultCall.Dial('1234');
    ConsultCall.Notes['Action'] := 'Conference';
  except
  end;
end;

procedure TForm1.hbTapiLine1Connected(Sender: ThbTapiLine; Call: ThbTapiCall);
begin
  if (Call.Notes['Action'] = 'Conference') then
  try
    Call.AddToConference;
  except
  end;
end;

The PrepareAddToConference method can be used to prepare an existing conference call for the addition of another party.

See Also

ThbTapiCall.ConferenceCall and ThbTapiLine.GetConfRelatedCalls