Click or drag to resize
TapiLineSetupConference Method
Sets up a conference call for the addition of the third party.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 6.0.0.1110
Syntax
public TapiCall SetupConference(
	TapiCall initialCall,
	out TapiCall consultationCall,
	int numParties
)

Parameters

initialCall
Type: Traysoft.AddTapiTapiCall
Initial call that identifies the first and second parties of a conference call. The call state of initialCall must be Connected. In some environments a call must exist to start a conference call. In other telephony environments, no call initially exists, and initialCall must be null (Nothing in Visual Basic).
consultationCall
Type: Traysoft.AddTapiTapiCall
When setting up a call for the addition of a new party, a new temporary call (consultation call) is automatically created. Use Dial(String) on that call to dial the number of the third party that you want to add to the conference.
numParties
Type: SystemInt32
Expected number of parties in the conference call. This number is passed to the service provider. The service provider is free to do as it pleases with this number: ignore it, use it as a hint to allocate the right size conference bridge inside the PBX, and so on.

Return Value

Type: TapiCall
A TapiCall object representing the newly created conference call.
Exceptions
ExceptionCondition
TapiExceptionThe conference was not set up because a TAPI error occurred.
Remarks

SetupConference initiates a conference for an existing two-party call that the initialCall parameter specifies. A conference call and consultation call are established, and TapiCall objects representing those calls are returned to the application. Use Dial(String) on the consultation call to dial the third party.

SetupConference provides two ways to establish a new conference call, depending on whether a normal two-party call is required to pre-exist or not. When setting up a conference call from an existing two-party call, the initialCall parameter is a call in the Connected state that is initially added to the conference call. On PBXs where conference call setup does not start with an existing call, initialCall must be null. In either case, a consultation call is allocated for connecting to the party that is to be added to the conference. The application can then use Dial(String) to dial the number of the other party.

The conference call typically transitions into the OnHoldPendingConference state, the consultation call into the DialTone state, and the initial call (if there is one) into the Conferenced state.

A conference call can also be set up by a CompleteTransfer(TapiCall, Boolean) that is resolved into a three-way conference. The application may be able to toggle between the consultation call and the conference call using SwapHold(TapiCall).

A consultation call can be canceled by invoking Disconnect on it. When dropping a consultation call, the existing conference call typically transitions back to the connected state. The application should observe the CallState events to determine exactly what happens to the calls. For example, if the conference call reverts back to a regular two-party call, the conference call becomes idle and the original participant call can revert to connected.

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

// First step: set up a conference, create consultation call and dial ext. 201
TapiCall consultationCall;
TapiCall conferenceCall = activeCall.Line.SetupConference(activeCall, out consultationCall, 3);
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