Click or drag to resize
TapiCallPrepareAddToConference Method
Prepares the conference call for the addition of another party.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 6.0.0.1110
Syntax
public TapiCall PrepareAddToConference()

Return Value

Type: TapiCall
Newly created consultation call to be added to the conference. Use Dial(String) on that call to dial the number of another party that you want to add to the conference.
Exceptions
ExceptionCondition
TapiExceptionThe consultation call was not created because a TAPI error occurred.
Remarks

The conference call is established either by SetupConference(TapiCall, TapiCall, Int32) or CompleteTransfer(TapiCall, Boolean) resolved as a 3-way conference. PrepareAddToConference places the existing conference call in the OnHoldPendingConference state and creates a consultation call that can be added later to the existing conference call with AddToConference(TapiCall). The consultation call can be canceled using Disconnect. The application may also be able to swap between the consultation call and the held conference call with SwapHold(TapiCall).

Some PBXs allow adding arbitrary calls to the conference, and such a call can have been set up using Dial(String, Boolean) and be on (hard) hold. PrepareAddToConference is not needed in that case.

Examples
The following code shows how to add another party to a conference. Error handling has been omitted for clarity.
// Assuming conferenceCall represents an active conference call in Connected state
// Consultation call will be created and extension 201 added to the conference

// First step: prepare the conference, create consultation call and dial ext. 201
TapiCall consultationCall = conferenceCall.PrepareAddToConference();
System.Threading.Thread.Sleep(500);
if (consultationCall.State != TapiCallState.DialTone) throw new Exception("Call state is not Dialtone");
consultationCall.Dial("201");
// When the state of the consultation call changes to Connected, the user can talk to ext. 201
// before adding ext. 201 to the conference
...
// Second step: connect consultation call to the conference
consultationCall.AddToConference(conferenceCall);
See Also