Click or drag to resize
TapiCall Class
Provides information about a call and methods for call flow processing.
Inheritance Hierarchy
SystemObject
  Traysoft.AddTapiTapiCall

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

The TapiCall type exposes the following members.

Properties
  NameDescription
Public propertyAddress
Gets a TapiAddress that received the call.
Public propertyCallData
Gets the application-settable call data.
Public propertyCallDuration
Gets the duration of the call.
Public propertyCalledID
Gets the called party's ID (phone number), if available.
Public propertyCalledIDName
Gets the called party's name, if available.
Public propertyCallerID
Gets the caller's ID (phone number), if available.
Public propertyCallerIDName
Gets the caller's name, if available.
Public propertyCallID
Gets a numeric identifier (sequence number) of the call.
Public propertyConnectedID
Gets the connected party's ID (phone number), if available.
Public propertyConnectedIDName
Gets the connected party's name, if available.
Public propertyConnectedMode
Gets the substate or mode of the connected call.
Public propertyDeviceSpecificInfo
Gets device specific information about the call.
Public propertyDeviceSpecificStatus
Gets device specific information about the status of the call.
Public propertyDirection
Gets a direction of the call (incoming or outgoing).
Public propertyDisconnectMode
Gets the disconnect mode (reason) for the disconnected call.
Public propertyDisplay
Gets the telephony system-specific call display information, if available.
Public propertyDisplayableAddress
Gets the displayable address (phone number) for logging purposes, if available.
Public propertyGuid
Gets the globally unique identifier (GUID) of the call.
Public propertyLine
Gets a TapiLine that the call is associated with.
Public propertyOrigin
Gets the origin of the call.
Public propertyPrivilege
Gets access rights or privileges an application may have to the corresponding call.
Public propertyReason
Gets the reason for the call.
Public propertyRedirectingID
Gets the redirecting party's ID (phone number), if available.
Public propertyRedirectingIDName
Gets the redirecting party's name, if available.
Public propertyRedirectionID
Gets the redirection party's ID (phone number), if available.
Public propertyRedirectionIDName
Gets the redirection party's name, if available.
Public propertyRelatedCallID
Gets a numeric identifier (sequence number) of the related call.
Public propertyState
Gets the state of the call.
Public propertyTag
Gets or sets the object that contains supplemental data about the call.
Public propertyTrunk
Gets the number of the trunk over which the call is routed.
Top
Methods
  NameDescription
Public methodAccept
Accepts offered call.
Public methodAddToConference
Adds the consultation call to the existing conference.
Public methodCode exampleAnswer
Answers incoming call.
Public methodCompleteTransfer
Completes the transfer of the call to the party connected in the consultation call.
Public methodDial(String)
Dials the specified number on the existing call.
Public methodDial(String, Boolean)
Dials the specified number on the existing call.
Public methodCode exampleDisconnect
Disconnects the call.
Public methodGatherDigits
Gathers one or more DTMF digits on the call.
Public methodGenerateDigits
Initiates the generation of the specified digits on the call.
Public methodGetCommHandle
Obtains a handle of the open communication port associated with the call.
Public methodHold
Places the call on hold.
Public methodPark
Performs directed or nondirected park.
Public methodPlay(String)
Plays a wave file. Pending speak and play requests are not purged.
Public methodPlay(String, Boolean)
Plays a wave file.
Public methodCode examplePrepareAddToConference
Prepares the conference call for the addition of another party.
Public methodRedirect
Redirects the call to the specified destination number.
Public methodRemoveFromConference
Removes the call from the conference.
Public methodCode exampleSetupTransfer
Initiates a transfer of the call. It establishes a consultation call, on which the destination of the transfer can be dialed.
Public methodSpeak(String)
Speaks the contents of a text string using text synthesis. Pending speak and play requests are not purged.
Public methodSpeak(String, Boolean)
Speaks the contents of a text string using text synthesis.
Public methodStartRecording
Starts recording of call audio.
Public methodStopPlayback
Stops currently playing wave file or text-to-speech.
Public methodStopRecording
Stops recording of call audio.
Public methodSwapHold
Swaps the active call with the specified call on consultation hold.
Public methodTransfer
Performs a blind or single-step transfer of the call.
Public methodUnhold
Retrieves the held call.
Public methodWaitForDigit
Waits until either a DTMF digit has been detected or the specified time interval has elapsed.
Public methodWaitForSilence
Waits until either a period of silence has been detected or the specified time interval has elapsed.
Public methodWaitUntilDone
Waits until either all pending speak and play requests have completed or the specified time interval has elapsed.
Top
Remarks

AddTapi.NET creates a TapiCall object for each incoming or outgoing call. TapiCall object contains information about a call such as the caller's number, and provides methods to play wave files, speak text and obtain digits pressed by a remote party.

TapiCall objects are provided to the application in TapiCallHandler callback, and in IncomingCall, CallConnected and CallDisconnected events. In addition, Dial(String, Boolean) method returns TapiCall object created for the outgoing call.

Examples
The following code shows how to obtain TapiCall object in the IncomingCall event handler.
TapiApp.Initialize("MyApp");
TapiApp.IncomingCall += OnIncomingCall;
...

void OnIncomingCall(object sender, TapiEventArgs args)
{
    TapiCall call = args.Call;
    // Display caller's number to the user
    Console.WriteLine("Incoming call from {0}", call.CallerID);
}
See Also