Overview

AddTapi.NET Developer's Manual
Overview
Overview of AddTapi.NET

With AddTapi.NET you can easily add telephony features to your application. AddTapi.NET will help you create call center applications, IVR systems, call recorders, phone dialers, voice mail systems or any other computer telephony application. AddTapi.NET wraps unmanaged Microsoft Telephony Application Programming Interface (TAPI) and provides a set of easy-to-use managed classes for developing CTI software.

AddTapi.NET requires .NET Framework version 2.0 - 4.7 and works with all .NET development platforms including Visual Studio 2005 - 2017, Visual C#, Visual Basic .NET (VB.NET) and Visual C++. AddTapi.NET supports TAPI 1.3 - 3.1 and works with all TAPI-compatible telephony hardware, from voice modems to advanced telephony boards to TAPI-compatible PBX systems.

Developer Support

AddTapi.NET license includes free e-mail technical support. Please visit Traysoft website at www.traysoft.com to submit a support request. You can also find additional samples, news, updates and other AddTapi-related information on our website. If you have any feedback or any questions please send an e-mail to devtools@traysoft.com. We reply to all e-mails within 1-2 business days.

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


Legal Information

Legal Information
Legal Information for AddTapi.NET Developer's Manual

While every precaution has been taken in the preparation of this document, Traysoft Inc. assumes no responsibility for errors or omissions, or for damages resulting from the use of information contained in this document or from the use of programs and source code that may accompany it. In no event shall Traysoft Inc. be liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this document.

Information in this document is subject to change without notice and does not represent a commitment on the part of Traysoft Inc. Companies, names, and data used in examples herein are fictitious unless otherwise noted. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, unless expressly permitted by Traysoft Inc.

Traysoft Inc. may have patents or pending patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. The furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property rights.


Redistributable Code

Redistributable Code

The Redistributable Code is the property of Traysoft Inc. and its suppliers and is protected by copyright law and international treaty provisions. You are authorized to make and use copies of the Redistributable Code either as part of the application in which you received the Redistributable Code, or in conjunction with the application for which its use is intended. Except as expressly provided in the End User License Agreement, you are not authorized to reproduce and distribute the Redistributable Code. Traysoft reserves all rights not expressly granted. You may not reverse engineer, decompile, or disassemble the Redistributable Code, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.

THE REDISTRIBUTABLE CODE IS PROVIDED TO YOU "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. YOU ASSUME THE ENTIRE RISK AS TO THE ACCURACY AND THE USE OF THE REDISTRIBUTABLE CODE. TRAYSOFT SHALL NOT BE LIABLE FOR ANY DAMAGES WHATSOEVER ARISING OUT OF THE USE OF OR INABILITY TO USE THE REDISTRIBUTABLE CODE, EVEN IF TRAYSOFT HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

AddTapi.NET Redistributable Code

Redistributable Code is identified as the following files:

Traysoft.AddTapi.dll - main AddTapi.NET assembly that contains all types in Traysoft.AddTapi namespace.

Traysoft.Internal.dll - internal Traysoft library used by AddTapi.NET.


Getting Started

Getting Started

Before you can use AddTapi.NET or any other TAPI-compatible software, you have to install and configure TAPI driver (also called Telephony Service Provider or TSP) for your telephony board or phone system. Windows has built-in Unimodem TSP for regular dial-up modems. For all other telephony hardware you will need to install and configure a TSP provided by the hardware manufacturer. Please refer to the manual for your telephony board or phone system for more information. Please contact us if you have any questions about TAPI drivers and we will be happy to help.

After TAPI driver (TSP) is installed and configured, you can try one of the samples included with AddTapi.NET. If TAPI driver is working properly, you should see available lines/extensions in the line selection box in the samples.

Using AddTapi.NET in your C# or VB.NET application

1. Add a reference to Traysoft.AddTapi.dll located in AddTapi installation folder to your project. If your application targets .NET 2.0 or 3.x, please reference Traysoft.AddTapi.dll located in NET2 folder of your AddTapi installation.

2. When the application loads, initialize AddTapi by calling Initialize(String). TAPI initialization is resource-intensive, so you should initialize AddTapi only once when the application loads and shut it down by calling Shutdown before the application terminates.

After initializing AddTapi, the application should subscribe to events it is interesting in. For example, a simple caller id application would subscribe to the IncomingCall event.

3. After AddTapi is initialized, the Lines collection contains a list of available lines that the application can use. Each TAPI line (TapiLine object) represents a physical line or a phone extension that can receive calls and place outgoing calls.

Open the line(s) that your application needs to monitor. The application should call Open(Boolean, TapiCallHandler) with the first argument set to true if the application wants to receive any call-related events from that line, such as IncomingCall, OutgoingCall, CallConnected and CallDisconnected events. If the application just needs to make outgoing calls on the line and is not interested in call-related events, first argument of Open(Boolean, TapiCallHandler) can be set to false. Dial(String, Boolean) can be used to make outgoing calls in any case.

C#
VB
C++
Copy
using Traysoft.AddTapi;
...
TapiApp.Initialize("MyApp");
TapiApp.IncomingCall += OnIncomingCall;
foreach (TapiLine line in TapiApp.Lines)
{
    // Show available lines to the user and allow to select the line(s) to monitor
    // line.Name contains user-friendly line name
    // In this example we open all available lines
    line.Open(true, null);
}
...
// This event handler is called when a new incoming call is received.
void OnIncomingCall(object sender, TapiEventArgs args)
{
    // Show call information to the user
    // args.Line contains TapiLine that received the call
    // args.Call contains TapiCall object with information about the call
    Console.WriteLine("Call from {0} on line {1}", args.Call.CallerID, args.Line.Name);
}
Imports Traysoft.AddTapi
...
TapiApp.Initialize("MyApp")
AddHandler TapiApp.IncomingCall, AddressOf OnIncomingCall
For Each objLine As TapiLine In TapiApp.Lines
    ' Show available lines to the user and allow to select the line(s) to monitor
    ' objLine.Name contains user-friendly line name
    ' In this example we open all available lines
    objLine.Open(True, Nothing)
Next
...
' This event handler is called when a new incoming call is received.
Private Sub OnIncomingCall(ByVal sender As Object, ByVal args As TapiEventArgs)
    ' Show call information to the user
    ' args.Line contains TapiLine that received the call
    ' args.Call contains TapiCall object with information about the call
    Console.WriteLine("Call from {0} on line {1}", args.Call.CallerID, args.Line.Name)
End Sub

No code example is currently available or this language may not be supported.

Caution note Caution

The simplified code above does not handle any AddTapi errors. Please refer to AddTapi.NET samples for the full sample code with error handling.


What's New in Version 5.3

What's New in Version 5.3
New in AddTapi.NET 5.3
  • Added TapiCallConnectedMode property that describes different substates of a connected call.
  • Added TapiLineOpen(Boolean, TapiCallHandler, TapiMediaMode, TapiCallPrivilege) method overload that allows to request specific call privileges when opening a line.
  • Added TapiCallDial(String, Boolean) method overload that allows to apply dialing rules when dialing on an existing call.
  • Fixed a rare race condition that was causing TapiCallState property to show Connected for some disconnected calls.


What's New in Version 5.2

What's New in Version 5.2
New in AddTapi.NET 5.2
  • Call data support

    The call data field is used to provide additional information related to a call in TAPI. Some systems, for example Avaya Voicemail Pro, use this field to pass additional information to TAPI applications monitoring the calls. New TapiCallCallData property gives the application access to the call data. The CallData flag has been added to the TapiCallInfoState enumeration. AddTapi.NET fires the TapiAppCallInfo event with this flag set when the call data becomes available or changes.

  • Special Information Tone (SIT) detection

    Special information tones such as Reorder, Intercept or No Circuit indicate that an outgoing call has failed. AddTapi.NET 5.2 can detect and report special information tones to the application when running on telephony hardware with SIT detection capabilities such as Way2Call Hi-Phone. When a SIT is detected the call transitions to the SpecialInfo state and then disconnects. AddTapi sets the TapiCallDisconnectMode property based on the type of SIT that was detected.

  • Call duration

    New version adds TapiCallCallDuration property that contains duration of the call. Call duration is calculated from the moment the call transitions to the Connected state.

  • Improved call state processing

    In previous versions of AddTapi.NET the application could miss a call state transition if TapiAppCallState events were firing quickly one after another. Version 5.2 processes call state messages from TAPI more efficiently and ensures that the TapiCallState reported to the application in the TapiAppCallState event handler matches call state in the corresponding TAPI message.

  • Other small fixes and improvements

    - Added TapiAddressAddressFeatures property that describes the operations that can be invoked on the address.

    - Added CallID and RelatedCallID flags to the TapiCallInfoState enumeration. These flags indicate that the TapiCallCallID or TapiCallRelatedCallID property has changed in the TapiAppCallInfo event.

    - Fixed: Some incoming calls where reported as outgoing on HiPath TAPI 170.

    - Fixed: Non-directed TapiCallPark(String) could time out on some systems.


What's New in Version 5.1

What's New in Version 5.1
New in AddTapi.NET 5.1

Version 5.1 is a small update that adds TapiLineSetupForwarding(IEnumerableTapiForwardEntry, Int32, TapiAddress) method for setting up call forwarding and do-not-disturb on the line.

This update also contains workarounds for non-standard behavior of Aastra TSP in some configurations.


What's New in Version 5.0

What's New in Version 5.0
New in AddTapi.NET 5.0
  • Conference call support

    AddTapi.NET 5.0 adds support for conference calls with three or more parties. The application can use TapiLineSetupConference(TapiCall, TapiCall, Int32) or TapiCallCompleteTransfer(TapiCall, Boolean) resolved as a 3-way conference to setup a conference call. Additional parties can be added to the conference using TapiCallPrepareAddToConference and TapiCallAddToConference(TapiCall) methods.

  • Audio playback and text-to-speech in Windows service applications

    This version includes new audio engine that supports audio playback and text-to-speech in applications that run as a service. With AddTapi.NET 5.0 you can develop Windows services that play .wav files and speak to the callers using text-to-speech. Both TapiCallPlay(String) and TapiCallSpeak(String) can be used in Windows service applications without any problems.

  • Line device state information

    New version adds TapiAppLineDeviceState event that fires when the state of the line device changes. The application can use this event to find out when the line goes out-of-service and back in-service (TapiLineDeviceStatusIsInService property), when the line is connected/disconnected to TAPI (TapiLineDeviceStatusIsConnected property) or when the message waiting indicator turns on/off (TapiLineDeviceStatusIsMsgWaitOn property).

  • Device-specific information about the line status

    Version 5.0 adds TapiLineDeviceStatusDeviceSpecificInfo property to obtain device-specific information about the line status. Avaya IP Office system uses this property to provide a lot of additional information about the line/extension, including call forwarding/DND information, number of read/new voicemail messages, user login information and much more. Please contact us for more informaiton and we will provide a code sample that shows how to use this feature of the Avaya IP Office phone system.

  • Separate assemblies for .NET 4.x and .NET 2.0/3.x

    Starting from version 5.0, AddTapi.NET assemblies located in the installation folder are compiled for .NET 4.0 and will not work with earlier versions of .NET Framework. If your applicaiton is targeting .NET 2.0 or 3.x, please reference Traysoft.AddTapi.dll located in the NET2 folder of your AddTapi.NET installation.

  • Other small fixes and improvements

    - Incoming calls were reported as outgoing on some phone systems with non-standard TAPI drivers.

    - Implemented a workaround for outgoing calls on Tadiran Coral IP PBX. The TAPI driver for the Coral system does not list any addresses that support outgoing calls and AddTapi was showing an error.

    - Version 5.0 uses 8kHz 16-bit audio format on Avaya IP Office for better audio quality.

    - TapiAppOutgoingCall event was not fired when establishing dial-up connection.


What's New in Version 4.0

What's New in Version 4.0
New in AddTapi.NET 4.0
  • Call pickup

    AddTapi.NET 4.0 adds TapiLinePickup methods to pick up a call ringing on another extension. These methods can also be used to pick up a call-waiting call. TapiAddressSupportsPickupCallWaiting property indicates if the telephony hardware supports call-waiting call pickup.

  • Call forwarding support

    The application can use TapiAddressGetForwardingInfo method to obtain call forwarding information for the address. Forwarding information describes when incoming calls are forwarded and the destination number(s) for call forwarding. New TapiAddressForwardModes property describes forwarding modes supported by the telephony hardware. AddTapi.NET fires ForwardingInfo event when call forwarding information changes.

  • Device-specific information for calls, lines and addresses

    New version adds TapiCallDeviceSpecificInfo, TapiLineDeviceSpecificInfo and TapiAddressDeviceSpecificInfo properties allowing applications to obtain device-specific information about calls, lines and addresses.

  • TAPI re-initialization

    AddTapi.NET 4.0 fires ReInit event when TAPI requires re-initialization. The application can handle this event to shutdown and re-initialize its use of TAPI without application restart. This is especially useful for long-running TAPI applications and services.

  • DTMF digit generated event

    Version 4.0 adds Generated event that fires when DTMF digit generation has terminated. The application can use event arguments to find out if the generation was completed successfully or if it was canceled.

  • Obtaining existing calls

    When the application opens a line for incoming calls, version 4.0 checks for existing calls on the line and adds them to the TapiLineCalls collection. AddTapi.NET 4.0 also obtains call information and call state for all existing calls automatically.

  • Other small fixes and improvements

    - Added OutOfOrder, Forwarded, Pickup, Cancelled and BadAddress to the TapiDisconnectMode enumeration to provide more information about the reason for call disconnect.

    - Improved compatibility with NeoSpeech and Scansoft Text-to-Speech engines.

    - Added TapiLineProviderInfo and TapiLineSwitchInfo properties.

    - New MonitorTones flag in TapiAddressCallFeatures indicates if TapiCallWaitForSilence(Int32, Int32) is supported by the telephony hardware.

    - Fixed "Cannot find a request that matches reply message" errors that were occuring with some telephony hardware.

    - Fixed an error with SIPTAPI telephony service provider.

    - Fixed a problem with non-directed TapiCallPark(String) on some systems.


What's New in Version 3.0

What's New in Version 3.0
New in AddTapi.NET 3.0
  • 2-step/consultation call transfer

    In addition to one-step/blind transfer, AddTapi.NET 3.0 supports 2-step or consultation call transfer. To start a 2-step transfer, call SetupTransfer to create a new consultation call. Wait until call state changes to Dialtone, then use Dial(String) to dial the destination number for the transfer. When consultation call is connected, use CompleteTransfer(TapiCall, Boolean) to complete the transfer.

  • Call park/unpark support

    New Park(String) and Unpark(String) methods were added to park/unpark calls. Version 3.0 supports both directed and nondirected call parking.

  • 3-way conference support

    New version adds support for 3-way conference (if supported by the telephony system). To create a 3-way conference, call SetupTransfer on the existing call to create a second call. Wait until call state changes to Dialtone, then use Dial(String) to dial the number you want to add to the conference. When the second call is connected, use CompleteTransfer(TapiCall, Boolean) with the second parameter set to true to join the calls and create 3-way conference.

  • New call recording engine

    AddTapi.NET 3.0 has new audio engine for recording calls. New engine has better performance when recording on many lines simultaneously and is more robust overall. StopPlayback is now a synchronous operation that stops playback immediately. This change allows call recording to start faster after playing a message, and prevents from loosing first second of the recording on telephony hardware that does not support simultaneous playback and recording. Because new version initializes audio engine as soon as the call is connected, your application can call StartRecording(String) from the CallConnected event handler.

  • Call privilege handling

    AddTapi.NET 3.0 automatically obtains owner privilege for calls when required, eliminating "application doesn't have owner privilege" errors. New Privilege property provides information about the current call privilege.

  • Dialing on existing call

    New Dial(String) method allows applications to dial on existing call. This is useful in many scenarios. For example, when user picks up a phone, new call in Dialtone state is created. Your application can use TapiCall.Dial method to dial the number on this call.

  • WaitForDigit and GatherDigits improvements

    In AddTapi.NET 3.0 WaitForDigit(Int32) and GatherDigits(Int32, String, Int32, Int32) methods accept negative timeout value. Negative value means that the timeout should start after playback initiated by the Play(String) or Speak(String) is completed.

  • Additional information about line and address capabilities

    New version adds CallFeatures, MaxNumActiveCalls, SupportsPredictiveDialing, IsRoutePoint, IsQueue, MaxNumActiveCalls and MaxNoAnswerTimeout properties that provide additional information about features and capabilities of the telephony hardware.

  • TapiLine.Calls collection

    Added Calls collection that contains all active calls on the line to simplify call management in some scenarios.

  • DigitDetected event

    Version 3.0 adds DigitDetected event that fires when a DTMF digit is detected on the line. This event provides alternative asynchronous mechanism for handling digits received during the call. WaitForDigit(Int32) and GatherDigits(Int32, String, Int32, Int32) are easier to use synchronous methods for handling DTMF digits.

  • Other small fixes and improvements

    - Added Trunk property to make call tracking across multiple trunks easier.

    - Added DisconnectOnBusy property.

    - Fixed a bug that caused device-specific functions to fail on some hardware.

    - Fixed a bug with WaitUntilDone(Int32) always returning false when zero timeout is specified.

    - Added checks to prevent multiple initialization of AddTapi.NET library.


What's New in Version 2.0

What's New in Version 2.0
New in AddTapi.NET 2.0
  • Call recording.

    Version 2.0 adds support for recording audio to a wave file. Use StartRecording(String) method to start recording and StopRecording to stop it. Please note that some telephony hardware does not support playing and recording at the same time. StopPlayback method was added to stop audio playback before recording on such hardware.

  • New TapiAddress class and related functionality.

    Some PBX systems are represented in TAPI as several lines with multiple addresses (phone extensions) on each line. TapiAddress class was added to simplify development for such systems. New Addresses property provides information about available addresses on the line. New Dial(String, Boolean, TapiMediaMode, TapiAddress) and Dial(String, Boolean, TapiMediaMode, String) methods accept TapiAddress or String parameter to specify originating address for an outgoing call. New Address property gets an address that received the call.

  • Support for device specific functions and events.

    Many Telephony Service Providers (TSP) provide functionality specific to the telephony system using device specific extensions. Version 2.0 fully supports device specific functionality and provides an easy way to access device specific functions and events. DeviceSpecificExtensionID property shows ID of the supported extension. NegotiateDeviceSpecificExtensionVersion(UInt32, UInt32) method allows to negotiate the version of the extension to use on the line. DeviceSpecific and DeviceSpecificFeature are device specific events. DeviceSpecific(Object, TapiAddress, TapiCall, Type) and DeviceSpecific(Byte, TapiAddress, TapiCall, Int32) methods allow you to call device specific functions. DeviceSpecificFeature(Object, UInt32, Type) and DeviceSpecificFeature(Byte, UInt32, Int32) methods provide access to device specific features.

  • New Accept and Redirect methods to route calls using route points.

    Route points are special lines (extensions) that can redirect incoming calls to other extensions. Route points do not support call answer or call transfer. Instead, incoming calls have to be accepted on the route point using Accept then redirected to another extension using Redirect(String).

  • Support for Hold/Unhold functionality.

    Hold method puts a call on hold. Unhold method retrieves a held call.

  • New properties to specify format of audio input/output.

    AudioInputFormat and AudioOutputFormat properties specify format for audio recording and playback. By default AddTapi.NET uses best format supported by the telephony hardware.

  • New CallID and RelatedCallID properties of TapiCall object.

    CallID and RelatedCallID properties have been added to enable matching of related calls.


What's New in Version 1.2

What's New in Version 1.2
New in AddTapi.NET 1.2
  • Full 64-bit Support.

    Version 1.2 is compiled with Platform Target set to "Any CPU" and supports native 64-bit mode. On a 64-bit operating system Traysoft.AddTapi.dll assembly is loaded as a 64-bit DLL and it uses 64-bit TAPI. Please note that some telephony hardware does not have 64-bit drivers and will not work on a 64-bit OS. Please confirm with your supplier that the hardware you are planning to use has 64-bit drivers and works on a 64-bit OS.

  • Support for legacy TAPI 1.3 and 1.4 hardware.

    In addition to TAPI 2.0-2.2, new version of AddTapi.NET supports telephony service providers (TSP) that implement version 1.3 or 1.4 of TAPI interface.

  • New Guid and Tag properties to simplify call management in your application.

    Version 1.2 adds Guid property that applications can use to track calls through all call-related events or to store call information in a database. Tag property can be used to store application-specific information associated with the call or the caller for easy access in call-related events.

  • New properties that provide more information about a call.

    Reason, Origin, RedirectionID, RedirectingID, Display properties were added to the TapiCall class to provide additional information about a call.

  • New CallInfo event to receive notifications about changes to the call information.

    Version 1.2 adds CallInfo event and TapiCallInfoState enumeration to notify applications when the information about a call changes.

  • New CallState event for tracking call state changes.

    Using CallState event an application can get notifications about all call state changes. Extended TapiCallState enumeration provides more information about call states.

  • Access to the communication port to support data transfer.

    Version 1.2 adds GetCommHandle method that returns a handle of the open communication port. This handle can be used to transfer data between the application and the remote terminal.


Reference

Reference
Namespaces
Namespace | Description
Traysoft.AddTapi | Contains all AddTAPI.NET types.


Traysoft.AddTapi Namespace

Traysoft.AddTapi Namespace
Contains all AddTAPI.NET types.
Classes
 | Class | Description
Public class | TapiAddress | Represents an address (phone number or extension) associated with the line device.
 | TapiApp | Performs AddTapi.NET initialization/shutdown and manages telephony lines.
 | TapiCall | Provides information about a call and methods for call flow processing.
Public class | TapiCallInfoEventArgs | Provides data for the CallInfo event.
Public class | TapiDeviceSpecificEventArgs | Provides data for the DeviceSpecific and DeviceSpecificFeature events.
Public class | TapiDeviceSpecificExtensionID | Describes an extension identifier used to identify device specific extensions for line devices.
Public class | TapiDigitDetectedEventArgs | Provides data for the DigitDetected event.
Public class | TapiDisconnectException | The exception that is thrown when the call is disconnected before application called Disconnect method.
Public class | TapiErrorEventArgs | Provides data for the TapiError event.
Public class | TapiEventArgs | Provides data for the AddTapi.NET events.
Public class | TapiException | The exception that is thrown when Telephony API (TAPI) error occurs.
Public class | TapiForwardEntry | Describes an entry of the forwarding instructions.
Public class | TapiForwardingInfoEventArgs | Provides data for the ForwardingInfo event.
Public class | TapiGeneratedEventArgs | Provides data for the Generated event.
Public class | TapiLine | Represents a telephony line device.
Public class | TapiLineDeviceStateEventArgs | Provides data for the LineDeviceState event.
Public class | TapiLineDeviceStatus | Represents current status of a line device.
Public class | TapiVoice | Represents a text-to-speech voice available on the computer.
Delegates
 | Delegate | Description
 | TapiCallHandler | Represents a method that will perform call flow processing.
Public delegate | TapiCallInfoEventHandler | Represents the method that will handle CallInfo event.
Public delegate | TapiDeviceSpecificEventHandler | Represents the method that will handle DeviceSpecific and DeviceSpecificFeature events.
Public delegate | TapiDigitDetectedEventHandler | Represents the method that will handle DigitDetected event.
Public delegate | TapiErrorEventHandler | Represents the method that will handle TapiError event.
Public delegate | TapiEventHandler | Represents the method that will handle AddTapi.NET events.
Public delegate | TapiForwardingInfoEventHandler | Represents the method that will handle ForwardingInfo event.
Public delegate | TapiGeneratedEventHandler | Represents the method that will handle Generated event.
Public delegate | TapiLineDeviceStateEventHandler | Represents the method that will handle LineDeviceState event.
Enumerations
 | Enumeration | Description
Public enumeration | TapiAddressFeatures | Indicate operations that can be invoked be invoked on an address.
Public enumeration | TapiAudioFormat | Describes audio formats for audio input/output.
Public enumeration | TapiCallDirection | Describes the direction of a call.
Public enumeration | TapiCallFeatures | Indicate operations that can be invoked for a given address or call.
Public enumeration | TapiCallInfoState | Describes various call information items in the CallInfo event.
Public enumeration | TapiCallOrigin | Describes the origin of a call.
Public enumeration | TapiCallPrivilege | The TapiCallPrivilege bit-flag constants describe the kinds of access rights or privileges an application may have to the corresponding call.
Public enumeration | TapiCallReason | Describes the reason for a call.
Public enumeration | TapiCallState | Describes the state of a call.
Public enumeration | TapiConnectedMode | Describes different substates of a connected call.
Public enumeration | TapiDisconnectMode | Describes different reasons for a disconnect of a call.
Public enumeration | TapiErrors | Contains the most common Telephony API (TAPI) error numbers.
Public enumeration | TapiForwardMode | Describes the conditions under which calls can be forwarded.
Public enumeration | TapiGeneratedMode | Describes the conditions under which digit or tone generation is terminated.
Public enumeration | TapiLineDeviceState | Describes various device state changes in the LineDeviceState event.
Public enumeration | TapiMediaMode | Describes media types (or modes) of a call.


TapiAddress Class

TapiAddress Class
Represents an address (phone number or extension) associated with the line device.
Inheritance Hierarchy
SystemObject
Traysoft.AddTapiTapiAddress

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public class TapiAddress
Public Class TapiAddress
public ref class TapiAddress

The TapiAddress type exposes the following members.

Properties
 | Name | Description
Public property | Address | Gets the phone number or extension assigned to the address.
Public property | AddressFeatures | Describes the operations that can be invoked on this address.
Public property | AddressID | Gets the address identifier for the address.
Public property | CallFeatures | Describes features available for all calls on this address.
Public property | DeviceSpecificInfo | Gets device specific information about the address.
Public property | ForwardModes | Indicates modes of forwarding available for this address.
Public property | IsQueue | Indicates if this address is a queue.
Public property | IsRoutePoint | Indicates if this address is a route point.
Public property | MaxNoAnswerTimeout | Gets the maximum no answer timeout for calls on this address.
Public property | MaxNumActiveCalls | Gets the maximum number of calls that can be active on the address.
Public property | SupportsPickupCallWaiting | Indicates if the call-waiting call can be picked on the address.
Public property | SupportsPredictiveDialing | Indicates if predictive dialing is supported on the address.
Top
Methods
 | Name | Description
Public method | GetForwardingInfo | Gets a forwarding information for the address.
Top
Remarks
Telephony system is represented as a set of TapiLine objects, each with one or more addresses. Most systems have one line for each phone number or extension, with one address on each line. For systems with multiple addresses on each line, TapiAddress object is used to obtain information about available addresses and to specify originating address for outgoing calls.
See Also

Reference

Traysoft.AddTapi Namespace
TapiLineAddresses


TapiAddress Properties

TapiAddress Properties

The TapiAddress type exposes the following members.

Properties
 | Name | Description
Public property | Address | Gets the phone number or extension assigned to the address.
Public property | AddressFeatures | Describes the operations that can be invoked on this address.
Public property | AddressID | Gets the address identifier for the address.
Public property | CallFeatures | Describes features available for all calls on this address.
Public property | DeviceSpecificInfo | Gets device specific information about the address.
Public property | ForwardModes | Indicates modes of forwarding available for this address.
Public property | IsQueue | Indicates if this address is a queue.
Public property | IsRoutePoint | Indicates if this address is a route point.
Public property | MaxNoAnswerTimeout | Gets the maximum no answer timeout for calls on this address.
Public property | MaxNumActiveCalls | Gets the maximum number of calls that can be active on the address.
Public property | SupportsPickupCallWaiting | Indicates if the call-waiting call can be picked on the address.
Public property | SupportsPredictiveDialing | Indicates if predictive dialing is supported on the address.
Top
See Also

Reference

TapiAddress Class
Traysoft.AddTapi Namespace


TapiAddress.Address Property

TapiAddressAddress Property
Gets the phone number or extension assigned to the address.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string Address { get; }
Public ReadOnly Property Address As String
    Get
public:
property String^ Address {
    String^ get ();
}

Property Value

Type: String
Remarks
Address property can contain null reference (Nothing in Visual Basic) if the line device has only one associated address.
See Also

Reference

TapiAddress Class


TapiAddress.AddressFeatures Property

TapiAddressAddressFeatures Property
Describes the operations that can be invoked on this address.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiAddressFeatures AddressFeatures { get; }
Public ReadOnly Property AddressFeatures As TapiAddressFeatures
    Get
public:
property TapiAddressFeatures AddressFeatures {
    TapiAddressFeatures get ();
}

Property Value

Type: TapiAddressFeatures
TapiAddressFeatures describing features available for this address.
Remarks
AddressFeatures reports the availability of the address features as indicated by the TSP for a given address.
See Also

Reference

TapiAddress Class
Traysoft.AddTapi Namespace
Traysoft.AddTapiTapiAddressFeatures


TapiAddress.AddressID Property

TapiAddressAddressID Property
Gets the address identifier for the address.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public int AddressID { get; }
Public ReadOnly Property AddressID As Integer
    Get
public:
property int AddressID {
    int get ();
}

Property Value

Type: Int32
Remarks
Individual addresses are referred to by address identifiers. Address identifiers range from zero to one less than the number of addresses on the line.
See Also

Reference

TapiAddress Class


TapiAddress.CallFeatures Property

TapiAddressCallFeatures Property
Describes features available for all calls on this address.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCallFeatures CallFeatures { get; }
Public ReadOnly Property CallFeatures As TapiCallFeatures
    Get
public:
property TapiCallFeatures CallFeatures {
    TapiCallFeatures get ();
}

Property Value

Type: TapiCallFeatures
TapiCallFeatures describing switching capabilities or features available for all calls on this address.
Remarks
This property represents the call-related features that may possibly be available on the address (static availability as opposed to dynamic availability). Invoking a supported feature requires the call to be in the proper state and the underlying line device to be opened in a compatible mode. A zero in a bit position indicates that the corresponding feature is never available. A one indicates that the corresponding feature may be available if the application has the right privileges to the call and the call is in the appropriate state for the operation to be meaningful. This member allows an application to discover which call features can be (and which can never be) supported by the address.
See Also

Reference

TapiAddress Class
Traysoft.AddTapi Namespace
Traysoft.AddTapiTapiCallFeatures


TapiAddress.DeviceSpecificInfo Property

TapiAddressDeviceSpecificInfo Property
Gets device specific information about the address.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public byte[] DeviceSpecificInfo { get; }
Public ReadOnly Property DeviceSpecificInfo As Byte()
    Get
public:
property array<unsigned char>^ DeviceSpecificInfo {
    array<unsigned char>^ get ();
}

Property Value

Type: Byte
Remarks

Many TSPs provide functionality specific to the telephony system using device specific extensions. Please refer to the TAPI documentation for the telephony hardware to find out about device specific functionality supported by the telephony service provider.

DeviceSpecificInfo property allows the application to retrieve device specific information about the address. The information provided in DeviceSpecificInfo property is described in TAPI documentation for the telephony hardware.

The application has to negotiate a version of the extension supported by the line device using NegotiateDeviceSpecificExtensionVersion(UInt32, UInt32) before opening the line in order to use device specific functionality.

See Also

Reference

TapiAddress Class
Traysoft.AddTapi Namespace
TapiLineNegotiateDeviceSpecificExtensionVersion(UInt32, UInt32)
TapiLineDeviceSpecific(Object, TapiAddress, TapiCall, Type)


TapiAddress.ForwardModes Property

TapiAddressForwardModes Property
Indicates modes of forwarding available for this address.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiForwardMode ForwardModes { get; }
Public ReadOnly Property ForwardModes As TapiForwardMode
    Get
public:
property TapiForwardMode ForwardModes {
    TapiForwardMode get ();
}

Property Value

Type: TapiForwardMode
TapiForwardMode flags describing forwarding modes supported on this address.
See Also

Reference

TapiAddress Class
Traysoft.AddTapi Namespace
TapiAddressGetForwardingInfo


TapiAddress.IsQueue Property

TapiAddressIsQueue Property
Indicates if this address is a queue.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public bool IsQueue { get; }
Public ReadOnly Property IsQueue As Boolean
    Get
public:
property bool IsQueue {
    bool get ();
}

Property Value

Type: Boolean
Remarks
This property is true if this address is not associated with a particular station or physical device, but is a holding place where calls wait for further processing. The calls placed in the queue may receive a particular treatment. They may also be automatically transferred when a particular resource becomes available (for example, if the queue is an ACD queue and calls are waiting for an available agent).
See Also

Reference

TapiAddress Class


TapiAddress.IsRoutePoint Property

TapiAddressIsRoutePoint Property
Indicates if this address is a route point.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public bool IsRoutePoint { get; }
Public ReadOnly Property IsRoutePoint As Boolean
    Get
public:
property bool IsRoutePoint {
    bool get ();
}

Property Value

Type: Boolean
Remarks
This property is true if this address is not associated with a particular station or physical device, but is a holding place where calls wait for routing by the application. The application examines calls arriving on this address, and can redirect the call to another address/extension using Redirect(String). The call can also be automatically transferred if a routing timeout expires (the switch usually assumes a default routing).
See Also

Reference

TapiAddress Class


TapiAddress.MaxNoAnswerTimeout Property

TapiAddressMaxNoAnswerTimeout Property
Gets the maximum no answer timeout for calls on this address.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public int MaxNoAnswerTimeout { get; }
Public ReadOnly Property MaxNoAnswerTimeout As Integer
    Get
public:
property int MaxNoAnswerTimeout {
    int get ();
}

Property Value

Type: Int32
Maximum value in seconds of the NoAnswerTimeout property for outgoing calls originating from this address.
Remarks
A value of 0 indicates that automatic abandonment of unanswered calls is not supported by the telephony hardware, or that the timeout value is not adjustable by applications. ///
See Also

Reference

TapiAddress Class
Traysoft.AddTapi Namespace
TapiLineNoAnswerTimeout


TapiAddress.MaxNumActiveCalls Property

TapiAddressMaxNumActiveCalls Property
Gets the maximum number of calls that can be active on the address.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public int MaxNumActiveCalls { get; }
Public ReadOnly Property MaxNumActiveCalls As Integer
    Get
public:
property int MaxNumActiveCalls {
    int get ();
}

Property Value

Type: Int32
Maximum number of active call appearances that the address can handle. This number does not include calls on hold or calls on hold pending transfer or conference.
See Also

Reference

TapiAddress Class


TapiAddress.SupportsPickupCallWaiting Property

TapiAddressSupportsPickupCallWaiting Property
Indicates if the call-waiting call can be picked on the address.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public bool SupportsPickupCallWaiting { get; }
Public ReadOnly Property SupportsPickupCallWaiting As Boolean
    Get
public:
property bool SupportsPickupCallWaiting {
    bool get ();
}

Property Value

Type: Boolean
Remarks
This property is true if Pickup(String, String, TapiAddress) can be used to pick up a call detected by the user as a call-waiting call.
See Also

Reference

TapiAddress Class
Traysoft.AddTapi Namespace
TapiLinePickup(String, String)


TapiAddress.SupportsPredictiveDialing Property

TapiAddressSupportsPredictiveDialing Property
Indicates if predictive dialing is supported on the address.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public bool SupportsPredictiveDialing { get; }
Public ReadOnly Property SupportsPredictiveDialing As Boolean
    Get
public:
property bool SupportsPredictiveDialing {
    bool get ();
}

Property Value

Type: Boolean
Remarks
This property is true if this address has enhanced call progress monitoring capabilities which can be applied to outgoing calls to determine call states such as ringback, busy, specialinfo and connected, or the media type of the device answering the call.
See Also

Reference

TapiAddress Class


TapiAddress Methods

TapiAddress Methods

The TapiAddress type exposes the following members.

Methods
 | Name | Description
Public method | GetForwardingInfo | Gets a forwarding information for the address.
Top
See Also

Reference

TapiAddress Class


TapiAddress.GetForwardingInfo Method

TapiAddressGetForwardingInfo Method
Gets a forwarding information for the address.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public IList<TapiForwardEntry> GetForwardingInfo()
Public Function GetForwardingInfo As IList(Of TapiForwardEntry)
public:
IList<TapiForwardEntry^>^ GetForwardingInfo()

Return Value

Type: IList TapiForwardEntry
A list of forwarding entries.
Remarks

GetForwardingInfo gets a list of forwarding instructions for the address. Forwarding instructions describe when incoming calls are forwarded and the destination number(s) for call forwarding. This method returns null (Nothing in Visual Basic) if call forwarding is not configured for the address or if call forwarding information is not available.

AddTapi.NET fires ForwardingInfo event to notify the application when forwarding information for the address changes. Some telephony service providers cannot detect when the forwarding information changes externally and do not notify the application about the changes.

See Also

Reference

TapiAddress Class
Traysoft.AddTapi Namespace
TapiAddressForwardModes


TapiAddressFeatures Enumeration

TapiAddressFeatures Enumeration
Indicate operations that can be invoked be invoked on an address.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
[FlagsAttribute]
public enum TapiAddressFeatures
<FlagsAttribute>
Public Enumeration TapiAddressFeatures
[FlagsAttribute]
public enum class TapiAddressFeatures
Members
Member name | Value | Description
Forward | 1 | The address can be forwarded (SetupForwarding(IEnumerableTapiForwardEntry, Int32, TapiAddress)).
MakeCall | 2 | An outgoing call can be placed on the address (Dial(String, Boolean)).
Pickup | 4 | A call can be picked up at the address (Pickup(String, String)).
SetupConference | 32 | A conference call without an initial call can be set up at this address (SetupConference(TapiCall, TapiCall, Int32)).
Unpark | 128 | Calls can be unparked using this address (Unpark(String, TapiAddress)).
PickupHeld | 256 | The Pickup(String, String, TapiAddress) method can be used to pick up a call that is held on the address.
PickupGroup | 512 | The Pickup(String, String) method can be used to pick up a call in the group.
PickupDirect | 1024 | The Pickup(String, String) method can be used to pick up a call on another line/extension.
PickupWaiting | 2048 | The Pickup(String, String) method can be used to pick up a call waiting call.
ForwardFwd | 4096 | The SetupForwarding(IEnumerableTapiForwardEntry, Int32, TapiAddress) method can be used to forward calls on the address to other numbers. Forward flag will also be set.
ForwardDND | 8192 | The SetupForwarding(IEnumerableTapiForwardEntry, Int32, TapiAddress) method (with an empty destination) can be used to turn on the Do Not Disturb feature on the address. Forward flag will also be set.
All | 12199 | A mask that includes all address features.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiApp Class

TapiApp Class
Performs AddTapi.NET initialization/shutdown and manages telephony lines.
Inheritance Hierarchy
SystemObject
Traysoft.AddTapiTapiApp

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static class TapiApp
Public NotInheritable Class TapiApp
public ref class TapiApp abstract sealed

The TapiApp type exposes the following members.

Properties
Name | Description
Lines | Gets a list of telephony line devices available on the computer.
SerialNumber | Sets a serial number in a licensed version of AddTapi.NET.
UseSynchronizationContext | Indicates whether AddTapi.NET should use SynchronizationContext when firing events.
Voices | Gets a list of text-to-speech voices available on the computer.
Top
Methods
Name | Description
Initialize | Initializes AddTapi.NET.
Shutdown | Shutdowns AddTapi.NET.
Top
Events
Name | Description
CallConnected | Occurs when a call has been established and the connection is made.
CallDisconnected | Occurs when a call has been disconnected.
CallInfo | Occurs when the call information about a call has changed.
CallState | Occurs when the state of a call has changed.
DeviceSpecific | Notifies the application about device specific events occurring on a line, address, or call.
DeviceSpecificFeature | Notifies the application about device specific events occurring on a line, address, or call.
DigitDetected | Notifies the application about DTMF digit detected on a line.
ForwardingInfo | Occurs when the forwarding status of the address has changed.
Generated | Notifies the application that DTMF digit generation has terminated.
IncomingCall | Occurs when a new incoming call is received.
LineAdded | Occurs when a new line device is added to the system.
LineClosed | Occurs when a line is forcibly closed by Windows because of hardware error or configuration changes.
LineDeviceState | Occurs when the state of a line device has changed.
LineRemoved | Occurs when existing line device is removed.
OutgoingCall | Occurs when a new outgoing call is detected.
ReInit | Notifies the application that TAPI system has requested re-initialization.
TapiError | Occurs when Telephony API (TAPI) error is received while performing an asynchronous operation.
Top
Remarks
TapiApp is a static class. Methods Initialize(String) and Shutdown are used to initialize and shutdown AddTapi.NET. Lines collection holds a list of telephony line devices installed on the computer. Voices is a list of text-to-speech voices available for text synthesis.
Examples
The following code shows how to initialzie and shutdown AddTapi.NET.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
Console.WriteLine("{0} telephony lines", TapiApp.Lines.Count);
TapiApp.Shutdown();
TapiApp.Initialize("MyApp")
Console.WriteLine("{0} telephony lines", TapiApp.Lines.Count)
TapiApp.Shutdown()

No code example is currently available or this language may not be supported.

See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiApp Properties

TapiApp Properties

The TapiApp type exposes the following members.

Properties
Name | Description
Lines | Gets a list of telephony line devices available on the computer.
SerialNumber | Sets a serial number in a licensed version of AddTapi.NET.
UseSynchronizationContext | Indicates whether AddTapi.NET should use SynchronizationContext when firing events.
Voices | Gets a list of text-to-speech voices available on the computer.
Top
See Also

Reference

TapiApp Class


TapiApp.Lines Property

TapiAppLines Property
Gets a list of telephony line devices available on the computer.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static IList<TapiLine> Lines { get; }
Public Shared ReadOnly Property Lines As IList(Of TapiLine)
    Get
public:
static property IList<TapiLine^>^ Lines {
    IList<TapiLine^>^ get ();
}

Property Value

Type: IList TapiLine
Remarks
Lines is a collection of TapiLine objects representing telephony line devices installed on the computer. This collection is updated automatically when a new line device is added to the system and when existing device is removed. The application can subscribe to LineAdded and LineRemoved events to receive notifications when a line device is added or removed.
Examples
The following code shows how to list line devices installed on the computer.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
foreach(TapiLine line in TapiApp.Lines)
{
    Console.WriteLine("Line device {0}", line.Name);
}
TapiApp.Shutdown();
TapiApp.Initialize("MyApp")
For Each line As TapiLine In TapiApp.Lines
    Console.WriteLine("Line device {0}", line.Name)
Next
TapiApp.Shutdown()

No code example is currently available or this language may not be supported.

See Also

Reference

TapiApp Class
Traysoft.AddTapi Namespace
Traysoft.AddTapiTapiLine
TapiAppLineAdded
TapiAppLineRemoved


TapiApp.SerialNumber Property

TapiAppSerialNumber Property
Sets a serial number in a licensed version of AddTapi.NET.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static string SerialNumber { set; }
Public Shared WriteOnly Property SerialNumber As String
    Set
public:
static property String^ SerialNumber {
    void set (String^ value);
}

Property Value

Type: String
Remarks
If you purchased a license for AddTapi.NET, set SerialNumber property to your AddTapi.NET serial number. The application must set the SerialNumber before calling Initialize(String). SerialNumber property is not supported in Demo version of AddTapi.NET.
See Also

Reference

TapiApp Class


TapiApp.UseSynchronizationContext Property

TapiAppUseSynchronizationContext Property
Indicates whether AddTapi.NET should use SynchronizationContext when firing events.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static bool UseSynchronizationContext { get; set; }
Public Shared Property UseSynchronizationContext As Boolean
    Get
    Set
public:
static property bool UseSynchronizationContext {
    bool get ();
    void set (bool value);
}

Property Value

Type: Boolean
Remarks

When the application initializes AddTapi.NET, AddTapi.NET acquires SynchronizationContext of the thread that called Initialize(String) method. If UseSynchronizationContext property is true, AddTapi.NET uses acquired synchronization context to send events to the application. This mechanism ensures that events arrive to the UI thread of the application and the application can access UI controls from the event handlers.

Set UseSynchronizationContext to false if you want AddTapi.NET to call event handlers on a separate thread. In this case the application will need to use its own synchronization mechanism to access UI controls from the event handlers.

This property has no effect for service applications. Applications that run as Windows service do not have synchronization context by default. All event handlers are called on a separate thread in service applications.

UseSynchronizationContext must be set to false for ASP.NET applications. If UseSynchronizationContext is not set to false, AddTapi.NET might try to invoke callback on a disposed thread causing exception or crash.

See Also

Reference

TapiApp Class


TapiApp.Voices Property

TapiAppVoices Property
Gets a list of text-to-speech voices available on the computer.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static IList<TapiVoice> Voices { get; }
Public Shared ReadOnly Property Voices As IList(Of TapiVoice)
    Get
public:
static property IList<TapiVoice^>^ Voices {
    IList<TapiVoice^>^ get ();
}

Property Value

Type: IList TapiVoice
Remarks
Voices is a collection of TapiVoice objects representing text-to-speech (TTS) voices installed on the computer. This collection is not updated automatically when a new TTS voice is added to the system. The application can call Shutdown followed by Initialize(String) to re-initialize AddTapi.NET and update a list of available TTS voices.
Examples
The following code shows how to list TTS voices installed on the computer.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
foreach(TapiVoice voice in TapiApp.Voices)
{
    Console.WriteLine("Voice {0}", voice.Name);
}
TapiApp.Shutdown();
TapiApp.Initialize("MyApp")
For Each voice As TapiVoice In TapiApp.Voices
    Console.WriteLine("Voice {0}", voice.Name)
Next
TapiApp.Shutdown()

No code example is currently available or this language may not be supported.

See Also

Reference

TapiApp Class
Traysoft.AddTapi Namespace
Traysoft.AddTapiTapiVoice
TapiLineSpeechVoice


TapiApp Methods

TapiApp Methods

The TapiApp type exposes the following members.

Methods
Name | Description
Initialize | Initializes AddTapi.NET.
Shutdown | Shutdowns AddTapi.NET.
Top
See Also

Reference

TapiApp Class


TapiApp.Initialize Method

TapiAppInitialize Method
Initializes AddTapi.NET.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static void Initialize(
    string applicationName
)
Public Shared Sub Initialize (
    applicationName As String
)
public:
static void Initialize(
    String^ applicationName
)

Parameters

applicationName
Type: SystemString
A string that contains the name of the application.
Exceptions
Exception | Condition
TapiException | The initialization failed because of Telephony API (TAPI) error.
Remarks
This method initializes AddTapi.NET and registers application name with Windows Telephony service. Initialize also populates Lines and Voices collections. Application must call this method before using any other AddTapi.NET functionality.
Note Note
This method is not thread safe and should be called on the main thread of the application (UI thread for Windows Forms applications). AddTapi.NET captures synchronization context of the thread that calls Initialize and uses captured context to call event handlers on the same thread.
Examples
The following code shows how to initialize AddTapi.NET.
C#
VB
C++
Copy
try
{
    // Initialize AddTapi.NET
    TapiApp.Initialize("SampleApplication");
}
catch (TapiException exc)
{
    Console.WriteLine("TAPI error during initialization. {0}", exc.Message);
}
catch (Exception exc)
{
    Console.WriteLine("Exception during initialization. {0}", exc.Message);
}
Try
    ' Initialize AddTapi.NET
    TapiApp.Initialize("SampleApplication")
Catch exc As TapiException
    Console.WriteLine("TAPI error during initialization. {0}", exc.Message)
Catch exc As Exception
    Console.WriteLine("Exception during initialization. {0}", exc.Message)
End Try

No code example is currently available or this language may not be supported.

See Also

Reference

TapiApp Class


TapiApp.Shutdown Method

TapiAppShutdown Method
Shutdowns AddTapi.NET.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static void Shutdown()
Public Shared Sub Shutdown
public:
static void Shutdown()
Remarks
This method shutdowns AddTapi.NET and terminates application's usage of Windows Telephony system. No other AddTapi.NET methods except Initialize(String) can be called after Shutdown.
See Also

Reference

TapiApp Class


TapiApp Events

TapiApp Events

The TapiApp type exposes the following members.

Events
Name | Description
CallConnected | Occurs when a call has been established and the connection is made.
CallDisconnected | Occurs when a call has been disconnected.
CallInfo | Occurs when the call information about a call has changed.
CallState | Occurs when the state of a call has changed.
DeviceSpecific | Notifies the application about device specific events occurring on a line, address, or call.
DeviceSpecificFeature | Notifies the application about device specific events occurring on a line, address, or call.
DigitDetected | Notifies the application about DTMF digit detected on a line.
ForwardingInfo | Occurs when the forwarding status of the address has changed.
Generated | Notifies the application that DTMF digit generation has terminated.
IncomingCall | Occurs when a new incoming call is received.
LineAdded | Occurs when a new line device is added to the system.
LineClosed | Occurs when a line is forcibly closed by Windows because of hardware error or configuration changes.
LineDeviceState | Occurs when the state of a line device has changed.
LineRemoved | Occurs when existing line device is removed.
OutgoingCall | Occurs when a new outgoing call is detected.
ReInit | Notifies the application that TAPI system has requested re-initialization.
TapiError | Occurs when Telephony API (TAPI) error is received while performing an asynchronous operation.
Top
See Also

Reference

TapiApp Class


TapiApp.CallConnected Event

TapiAppCallConnected Event
Occurs when a call has been established and the connection is made.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static event TapiEventHandler CallConnected
Public Shared Event CallConnected As TapiEventHandler
public:
static  event TapiEventHandler^ CallConnected {
    void add (TapiEventHandler^ value);
    void remove (TapiEventHandler^ value);
}

Value

Type: Traysoft.AddTapiTapiEventHandler
Remarks
This event occurs when connection to a remote party has been established. For incoming calls, this event is fired after the call has been answered. For outgoing calls, this event is fired after the call has been answered if the line supports predictive dialing (also called hardware answer detection). Most voice modems do not support predictive dialing and report that the call is connected immediately after the number has been dialed, before called party picks up the phone. In such case this event is fired before outgoing call is actually answered.
Note Note
In Windows Forms and WPF applications AddTapi.NET executes the handler of this event on the main thread of the application (the thread that called Initialize(String)). It is safe to access Windows Forms or WPF controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to handle CallConnected event.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiApp.CallConnected += OnCallConnected;
...

void OnCallConnected(object sender, TapiEventArgs args)
{
    // Display a message to the user
    Console.WriteLine("Call connected on line {0}", args.Line.Name);
}
TapiApp.Initialize("MyApp")
AddHandler TapiApp.CallConnected, AddressOf OnCallConnected
...

Private Sub OnCallConnected(ByVal sender As Object, ByVal args As TapiEventArgs)
    ' Display a message to the user
    Console.WriteLine("Call connected on line {0}", args.Line.Name)
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiApp Class


TapiApp.CallDisconnected Event

TapiAppCallDisconnected Event
Occurs when a call has been disconnected.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static event TapiEventHandler CallDisconnected
Public Shared Event CallDisconnected As TapiEventHandler
public:
static  event TapiEventHandler^ CallDisconnected {
    void add (TapiEventHandler^ value);
    void remove (TapiEventHandler^ value);
}

Value

Type: Traysoft.AddTapiTapiEventHandler
Remarks
This event occurs when a call has been disconnected, either by AddTapi.NET, telephony hardware or the remote party. This event is fired when remote party hangs up the phone. It might take 10-20 seconds for the telephony hardware to detect that the remote party hung up. In addition, this event is also fired when outgoing call cannot be completed because there is no dailtone, a busy signal was detected or if the called party did not answer within the time interval set in NoAnswerTimeout property. After CallDisconnected event occurs, another outgoing call can be placed on the same line.
Note Note
In Windows Forms and WPF applications AddTapi.NET executes the handler of this event on the main thread of the application (the thread that called Initialize(String)). It is safe to access Windows Forms or WPF controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to handle CallDisconnected event.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiApp.CallDisconnected += OnCallDisconnected;
...

void OnCallDisconnected(object sender, TapiEventArgs args)
{
    // Display a message to the user
    Console.WriteLine("Call disconnected on line {0}", args.Line.Name);
}
TapiApp.Initialize("MyApp")
AddHandler TapiApp.CallDisconnected, AddressOf OnCallDisconnected
...

Private Sub OnCallDisconnected(ByVal sender As Object, ByVal args As TapiEventArgs)
    ' Display a message to the user
    Console.WriteLine("Call disconnected on line {0}", args.Line.Name)
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiApp Class


TapiApp.CallInfo Event

TapiAppCallInfo Event
Occurs when the call information about a call has changed.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static event TapiCallInfoEventHandler CallInfo
Public Shared Event CallInfo As TapiCallInfoEventHandler
public:
static  event TapiCallInfoEventHandler^ CallInfo {
    void add (TapiCallInfoEventHandler^ value);
    void remove (TapiCallInfoEventHandler^ value);
}

Value

Type: Traysoft.AddTapiTapiCallInfoEventHandler
Remarks

This event is fired when a telephony service provider reports that the call information has changed. Use CallInfoState property to find out which call information item(s) has changed.

CallInfo event can be fired before AddTapi.NET reports a new call using IncomingCall or OutgoingCall event. Most applications do not need to handle CallInfo event. AddTapi.NET automatically updates TapiCall object with new call information when needed. If the WaitForCallerID property is set to false, the application can use CallInfo event to receive notification when Caller ID information becomes available.

Note Note
In Windows Forms and WPF applications AddTapi.NET executes the handler of this event on the main thread of the application (the thread that called Initialize(String)). It is safe to access Windows Forms or WPF controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to handle CallInfo event.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiApp.CallInfo += OnCallInfo;
...

void OnCallInfo(object sender, TapiCallInfoEventArgs args)
{
    // Check if caller id is available and display to the user
    if ((args.CallInfoState & TapiCallInfoState.CallerID) != 0)
    {
       Console.WriteLine("CallerID={0}, CallerIDName={1}", args.Call.CallerID, args.Call.CallerIDName);
    }
}
TapiApp.Initialize("MyApp")
AddHandler TapiApp.CallInfo, AddressOf OnCallInfo
...

Private Sub OnCallInfo(ByVal sender As Object, ByVal args As TapiCallInfoEventArgs)
    ' Check if caller id is available and display to the user
    If args.CallInfoState And TapiCallInfoState.CallerID Then
        Console.WriteLine("CallerID={0}, CallerIDName={1}", args.Call.CallerID, args.Call.CallerIDName)
    End If
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiApp Class
Traysoft.AddTapi Namespace
Traysoft.AddTapiTapiCallInfoState
TapiLineWaitForCallerID


TapiApp.CallState Event

TapiAppCallState Event
Occurs when the state of a call has changed.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static event TapiEventHandler CallState
Public Shared Event CallState As TapiEventHandler
public:
static  event TapiEventHandler^ CallState {
    void add (TapiEventHandler^ value);
    void remove (TapiEventHandler^ value);
}

Value

Type: Traysoft.AddTapiTapiEventHandler
Remarks

This event is fired when a telephony service provider reports that the state of a call has changed. Use State property to obtain new state of the call.

CallState event can be fired before AddTapi.NET reports a new call using IncomingCall or OutgoingCall event. Most applications do not need to handle CallState event and should use IncomingCall, OutgoingCall, CallConnected and CallDisconnected events instead.

Note Note
In Windows Forms and WPF applications AddTapi.NET executes the handler of this event on the main thread of the application (the thread that called Initialize(String)). It is safe to access Windows Forms or WPF controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to handle CallState event.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiApp.CallState += OnCallState;
...

void OnCallState(object sender, TapiEventArgs args)
{
    TapiCallState callState = args.Call.State;
    // Display a message to the user
    Console.WriteLine("Call on line {0} transitioned to {1} state", args.Line.Name, callState);
}
TapiApp.Initialize("MyApp")
AddHandler TapiApp.CallState, AddressOf OnCallState
...

Private Sub OnCallState(ByVal sender As Object, ByVal args As TapiEventArgs)
    Dim callState As TapiCallState
    callState = args.Call.State
    ' Display a message to the user
    Console.WriteLine("Call on line {0} transitioned to {1} state", args.Line.Name, callState)
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiApp Class


TapiApp.DeviceSpecific Event

TapiAppDeviceSpecific Event
Notifies the application about device specific events occurring on a line, address, or call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static event TapiDeviceSpecificEventHandler DeviceSpecific
Public Shared Event DeviceSpecific As TapiDeviceSpecificEventHandler
public:
static  event TapiDeviceSpecificEventHandler^ DeviceSpecific {
    void add (TapiDeviceSpecificEventHandler^ value);
    void remove (TapiDeviceSpecificEventHandler^ value);
}

Value

Type: Traysoft.AddTapiTapiDeviceSpecificEventHandler
Remarks

DeviceSpecific event is used by a telephony service provider to notify the application about device specific events. The application must negotiate device specific extension version using NegotiateDeviceSpecificExtensionVersion(UInt32, UInt32) before opening the line to receive DeviceSpecific events. The meaning of the event and its parameters are device specific. Please refer to the TAPI documentation for the telephony hardware to find out about device specific functionality supported by the telephony service provider.

Note Note
In Windows Forms and WPF applications AddTapi.NET executes the handler of this event on the main thread of the application (the thread that called Initialize(String)). It is safe to access Windows Forms or WPF controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to handle DeviceSpecific event.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiApp.DeviceSpecific += OnDeviceSpecific;
...

void OnDeviceSpecific(object sender, TapiDeviceSpecificEventArgs args)
{
    Console.WriteLine("Device specific event on line {0}", args.Line.Name);
    Console.WriteLine("Param1={0}, Param2={1}, Param3={2}", args.Param1, args.Param2, args.Param3);
}
TapiApp.Initialize("MyApp")
AddHandler TapiApp.DeviceSpecific, AddressOf OnDeviceSpecific
...

Private Sub OnDeviceSpecific(ByVal sender As Object, ByVal args As TapiDeviceSpecificEventArgs)
    Console.WriteLine("Device specific event on line {0}", args.Line.Name)
    Console.WriteLine("Param1={0}, Param2={1}, Param3={2}", args.Param1, args.Param2, args.Param3)
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiApp Class
Traysoft.AddTapi Namespace
TapiLineNegotiateDeviceSpecificExtensionVersion(UInt32, UInt32)
TapiLineDeviceSpecific(Object, TapiAddress, TapiCall, Type)


TapiApp.DeviceSpecificFeature Event

TapiAppDeviceSpecificFeature Event
Notifies the application about device specific events occurring on a line, address, or call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static event TapiDeviceSpecificEventHandler DeviceSpecificFeature
Public Shared Event DeviceSpecificFeature As TapiDeviceSpecificEventHandler
public:
static  event TapiDeviceSpecificEventHandler^ DeviceSpecificFeature {
    void add (TapiDeviceSpecificEventHandler^ value);
    void remove (TapiDeviceSpecificEventHandler^ value);
}

Value

Type: Traysoft.AddTapiTapiDeviceSpecificEventHandler
Remarks

DeviceSpecificFeature event is used by a telephony service provider to notify the application about device specific events. The application must negotiate device specific extension version using NegotiateDeviceSpecificExtensionVersion(UInt32, UInt32) before opening the line to receive DeviceSpecificFeature events. The meaning of the event and its parameters are device specific. Please refer to the TAPI documentation for the telephony hardware to find out about device specific functionality supported by the telephony service provider.

Note Note
In Windows Forms and WPF applications AddTapi.NET executes the handler of this event on the main thread of the application (the thread that called Initialize(String)). It is safe to access Windows Forms or WPF controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to handle DeviceSpecificFeature event.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiApp.DeviceSpecificFeature += OnDeviceSpecificFeature;
...

void OnDeviceSpecificFeature(object sender, TapiDeviceSpecificEventArgs args)
{
    Console.WriteLine("Device specific feature event on line {0}", args.Line.Name);
    Console.WriteLine("Param1={0}, Param2={1}, Param3={2}", args.Param1, args.Param2, args.Param3);
}
TapiApp.Initialize("MyApp")
AddHandler TapiApp.DeviceSpecificFeature, AddressOf OnDeviceSpecificFeature
...

Private Sub OnDeviceSpecificFeature(ByVal sender As Object, ByVal args As TapiDeviceSpecificEventArgs)
    Console.WriteLine("Device specific feature event on line {0}", args.Line.Name)
    Console.WriteLine("Param1={0}, Param2={1}, Param3={2}", args.Param1, args.Param2, args.Param3)
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiApp Class
Traysoft.AddTapi Namespace
TapiLineNegotiateDeviceSpecificExtensionVersion(UInt32, UInt32)
TapiLineDeviceSpecificFeature(Object, UInt32, Type)


TapiApp.DigitDetected Event

TapiAppDigitDetected Event
Notifies the application about DTMF digit detected on a line.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static event TapiDigitDetectedEventHandler DigitDetected
Public Shared Event DigitDetected As TapiDigitDetectedEventHandler
public:
static  event TapiDigitDetectedEventHandler^ DigitDetected {
    void add (TapiDigitDetectedEventHandler^ value);
    void remove (TapiDigitDetectedEventHandler^ value);
}

Value

Type: Traysoft.AddTapiTapiDigitDetectedEventHandler
Remarks

DigitDetected event is used to notify the application about DTMF digits detected during the call. The telephony hardware must support DTMF detection for this event to work. DigitDetected event provides alternative asynchronous mechanism for processing user input during the call. WaitForDigit(Int32) and GatherDigits(Int32, String, Int32, Int32) are easier to use synchronous methods that your application can use for the same purpose.

Note Note
In Windows Forms and WPF applications AddTapi.NET executes the handler of this event on the main thread of the application (the thread that called Initialize(String)). It is safe to access Windows Forms or WPF controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to handle DigitDetected event.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiApp.DigitDetected += OnDigitDetected;
...

void OnDigitDetected(object sender, TapiDigitDetectedEventArgs args)
{
    Console.WriteLine("Digit {0} detected on line {1}", args.Digit, args.Line.Name);
}
TapiApp.Initialize("MyApp")
AddHandler TapiApp.DigitDetected, AddressOf OnDigitDetected
...

Private Sub OnDigitDetected(ByVal sender As Object, ByVal args As TapiDigitDetectedEventArgs)
    Console.WriteLine("Digit {0} detected on line {1}", args.Digit, args.Line.Name)
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiApp Class
Traysoft.AddTapi Namespace
TapiCallWaitForDigit(Int32)
TapiCallGatherDigits(Int32, String, Int32, Int32)


TapiApp.ForwardingInfo Event

TapiAppForwardingInfo Event
Occurs when the forwarding status of the address has changed.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static event TapiForwardingInfoEventHandler ForwardingInfo
Public Shared Event ForwardingInfo As TapiForwardingInfoEventHandler
public:
static  event TapiForwardingInfoEventHandler^ ForwardingInfo {
    void add (TapiForwardingInfoEventHandler^ value);
    void remove (TapiForwardingInfoEventHandler^ value);
}

Value

Type: Traysoft.AddTapiTapiForwardingInfoEventHandler
Remarks

ForwardingInfo event is fired when a telephony service provider reports that the forwarding status of the address has changed, including possibly the number of rings for determining a no-answer condition. The application should call GetForwardingInfo to determine details about the address's current forwarding status.

Note Note
In Windows Forms and WPF applications AddTapi.NET executes the handler of this event on the main thread of the application (the thread that called Initialize(String)). It is safe to access Windows Forms or WPF controls from the event handler without using Invoke mechanism.
See Also

Reference

TapiApp Class
Traysoft.AddTapi Namespace
TapiAddressGetForwardingInfo
TapiAddressForwardModes


TapiApp.Generated Event

TapiAppGenerated Event
Notifies the application that DTMF digit generation has terminated.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static event TapiGeneratedEventHandler Generated
Public Shared Event Generated As TapiGeneratedEventHandler
public:
static  event TapiGeneratedEventHandler^ Generated {
    void add (TapiGeneratedEventHandler^ value);
    void remove (TapiGeneratedEventHandler^ value);
}

Value

Type: Traysoft.AddTapiTapiGeneratedEventHandler
Remarks

Generated event is used to notify the application that the current digit or tone generation has terminated. Only one such generation request can be in progress an a given call at any time. This event is also fired when digit or tone generation is canceled.

Note Note
In Windows Forms and WPF applications AddTapi.NET executes the handler of this event on the main thread of the application (the thread that called Initialize(String)). It is safe to access Windows Forms or WPF controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to handle Generated event.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiApp.Generated += OnGenerated;
...

void OnGenerated(object sender, TapiGeneratedEventArgs args)
{
    Console.WriteLine("Digit generation terminated on line {0}: {1}", args.Line.Name, args.Mode);
}
TapiApp.Initialize("MyApp")
AddHandler TapiApp.Generated, AddressOf OnGenerated
...

Private Sub OnGenerated(ByVal sender As Object, ByVal args As TapiGeneratedEventArgs)
    Console.WriteLine("Digit generation terminated on line {0}: {1}", args.Line.Name, args.Mode)
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiApp Class
Traysoft.AddTapi Namespace
TapiCallGenerateDigits(String)


TapiApp.IncomingCall Event

TapiAppIncomingCall Event
Occurs when a new incoming call is received.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static event TapiEventHandler IncomingCall
Public Shared Event IncomingCall As TapiEventHandler
public:
static  event TapiEventHandler^ IncomingCall {
    void add (TapiEventHandler^ value);
    void remove (TapiEventHandler^ value);
}

Value

Type: Traysoft.AddTapiTapiEventHandler
Remarks
This event occurs when a new incoming call is received on the open line. After a new incoming call is detected, AddTapi.NET waits up to 3 seconds for Caller ID information to arrive before firing this event. Set WaitForCallerID property to false if you want AddTapi.NET to fire this event immediately after a new call is detected.
Note Note
In Windows Forms and WPF applications AddTapi.NET executes the handler of this event on the main thread of the application (the thread that called Initialize(String)). It is safe to access Windows Forms or WPF controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to handle IncomingCall event.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiApp.IncomingCall += OnIncomingCall;
...

void OnIncomingCall(object sender, TapiEventArgs args)
{
    // Display a message to the user
    Console.WriteLine("Incoming call from {0} on line {1}", args.Call.CallerID, args.Line.Name);
}
TapiApp.Initialize("MyApp")
AddHandler TapiApp.IncomingCall, AddressOf OnIncomingCall
...

Private Sub OnIncomingCall(ByVal sender As Object, ByVal args As TapiEventArgs)
    ' Display a message to the user
    Console.WriteLine("Incoming call from {0} on line {1}", args.Call.CallerID, args.Line.Name)
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiApp Class


TapiApp.LineAdded Event

TapiAppLineAdded Event
Occurs when a new line device is added to the system.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static event TapiEventHandler LineAdded
Public Shared Event LineAdded As TapiEventHandler
public:
static  event TapiEventHandler^ LineAdded {
    void add (TapiEventHandler^ value);
    void remove (TapiEventHandler^ value);
}

Value

Type: Traysoft.AddTapiTapiEventHandler
Remarks
This event occurs when a new telephony line device is detected while the application is running, for example, when a USB modem is connected to the system. New TapiLine object is added to the Lines collection before this event is fired.
Note Note
In Windows Forms and WPF applications AddTapi.NET executes the handler of this event on the main thread of the application (the thread that called Initialize(String)). It is safe to access Windows Forms or WPF controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to handle LineAdded event.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiApp.LineAdded += OnLineAdded;
...

void OnLineAdded(object sender, TapiEventArgs args)
{
    // Display the name of newly added line
    Console.WriteLine("{0} added", args.Line.Name);
}
TapiApp.Initialize("MyApp")
AddHandler TapiApp.LineAdded, AddressOf OnLineAdded
...

Private Sub OnLineAdded(ByVal sender As Object, ByVal args As TapiEventArgs)
    ' Display the name of newly added line
    Console.WriteLine("{0} added", args.Line.Name)
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiApp Class


TapiApp.LineClosed Event

TapiAppLineClosed Event
Occurs when a line is forcibly closed by Windows because of hardware error or configuration changes.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static event TapiEventHandler LineClosed
Public Shared Event LineClosed As TapiEventHandler
public:
static  event TapiEventHandler^ LineClosed {
    void add (TapiEventHandler^ value);
    void remove (TapiEventHandler^ value);
}

Value

Type: Traysoft.AddTapiTapiEventHandler
Remarks
This event occurs when a telephony line that the application opened by calling Open(Boolean, TapiCallHandler) has been forcibly closed by Windows. The common cause is a hardware error or incorrect device driver. The application should report this error to the user and try to open the line again at later time.
Note Note
In Windows Forms and WPF applications AddTapi.NET executes the handler of this event on the main thread of the application (the thread that called Initialize(String)). It is safe to access Windows Forms or WPF controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to handle LineClosed event.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiApp.LineClosed += OnLineClosed;
...

void OnLineClosed(object sender, TapiEventArgs args)
{
    // Display a message to the user
    Console.WriteLine("{0} has been forcibly closed", args.Line.Name);
}
TapiApp.Initialize("MyApp")
AddHandler TapiApp.LineClosed, AddressOf OnLineClosed
...

Private Sub OnLineClosed(ByVal sender As Object, ByVal args As TapiEventArgs)
    ' Display a message to the user
    Console.WriteLine("{0} has been forcibly closed", args.Line.Name)
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiApp Class


TapiApp.LineDeviceState Event

TapiAppLineDeviceState Event
Occurs when the state of a line device has changed.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static event TapiLineDeviceStateEventHandler LineDeviceState
Public Shared Event LineDeviceState As TapiLineDeviceStateEventHandler
public:
static  event TapiLineDeviceStateEventHandler^ LineDeviceState {
    void add (TapiLineDeviceStateEventHandler^ value);
    void remove (TapiLineDeviceStateEventHandler^ value);
}

Value

Type: Traysoft.AddTapiTapiLineDeviceStateEventHandler
Remarks

This event is fired when a telephony service provider reports that the state of a line device has changed. Use LineDeviceState property in your event handler to find out which device status item has changed.

Note Note
In Windows Forms and WPF applications AddTapi.NET executes the handler of this event on the main thread of the application (the thread that called Initialize(String)). It is safe to access Windows Forms or WPF controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to handle LineDeviceState event.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiApp.LineDeviceState += OnLineDeviceState;
...

void OnLineDeviceState(object sender, TapiLineDeviceStateEventArgs args)
{
    // Notify that the line is ringing
    if ((args.LineDeviceState & TapiLineDeviceState.Ringing) != 0)
    {
       Console.WriteLine("Ringing on line {0}", args.Line.Name);
    }
}
TapiApp.Initialize("MyApp")
AddHandler TapiApp.LineDeviceState, AddressOf OnLineDeviceState
...

Private Sub OnLineDeviceState(ByVal sender As Object, ByVal args As TapiLineDeviceStateEventArgs)
    ' Notify that the line is ringing
    If args.LineDeviceState And TapiLineDeviceState.Ringing Then
        Console.WriteLine("Ringing on line {0}", args.Line.Name)
    End If
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiApp Class
Traysoft.AddTapi Namespace
Traysoft.AddTapiTapiLineDeviceState
TapiLineDeviceStatus


TapiApp.LineRemoved Event

TapiAppLineRemoved Event
Occurs when existing line device is removed.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static event TapiEventHandler LineRemoved
Public Shared Event LineRemoved As TapiEventHandler
public:
static  event TapiEventHandler^ LineRemoved {
    void add (TapiEventHandler^ value);
    void remove (TapiEventHandler^ value);
}

Value

Type: Traysoft.AddTapiTapiEventHandler
Remarks
This event occurs when a telephony line device is removed while the application is running, for example, when a USB modem is disconnected. TapiLine object representing the removed device is removed from the Lines collection before this event is fired.
Note Note
In Windows Forms and WPF applications AddTapi.NET executes the handler of this event on the main thread of the application (the thread that called Initialize(String)). It is safe to access Windows Forms or WPF controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to handle LineRemoved event.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiApp.LineRemoved += OnLineRemoved;
...

void OnLineRemoved(object sender, TapiEventArgs args)
{
    // Display the name of the removed line
    Console.WriteLine("{0} has been removed", args.Line.Name);
}
TapiApp.Initialize("MyApp")
AddHandler TapiApp.LineRemoved, AddressOf OnLineRemoved
...

Private Sub OnLineRemoved(ByVal sender As Object, ByVal args As TapiEventArgs)
    ' Display the name of the removed line
    Console.WriteLine("{0} has been removed", args.Line.Name)
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiApp Class


TapiApp.OutgoingCall Event

TapiAppOutgoingCall Event
Occurs when a new outgoing call is detected.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static event TapiEventHandler OutgoingCall
Public Shared Event OutgoingCall As TapiEventHandler
public:
static  event TapiEventHandler^ OutgoingCall {
    void add (TapiEventHandler^ value);
    void remove (TapiEventHandler^ value);
}

Value

Type: Traysoft.AddTapiTapiEventHandler
Remarks
This event occurs when a new outgoing call is detected on the open line. Please note that voice modems cannot detect outgoing calls dialed from the attached phone.
Note Note
In Windows Forms and WPF applications AddTapi.NET executes the handler of this event on the main thread of the application (the thread that called Initialize(String)). It is safe to access Windows Forms or WPF controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to handle OutgoingCall event.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiApp.OutgoingCall += OnOutgoingCall;
...

void OnOutgoingCall(object sender, TapiEventArgs args)
{
    // Display a message to the user
    Console.WriteLine("Outgoing call to {0} on line {1}", args.Call.CalledID, args.Line.Name);
}
TapiApp.Initialize("MyApp")
AddHandler TapiApp.OutgoingCall, AddressOf OnOutgoingCall
...

Private Sub OnOutgoingCall(ByVal sender As Object, ByVal args As TapiEventArgs)
    ' Display a message to the user
    Console.WriteLine("Outgoing call to {0} on line {1}", args.Call.CalledID, args.Line.Name)
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiApp Class


TapiApp.ReInit Event

TapiAppReInit Event
Notifies the application that TAPI system has requested re-initialization.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static event TapiEventHandler ReInit
Public Shared Event ReInit As TapiEventHandler
public:
static  event TapiEventHandler^ ReInit {
    void add (TapiEventHandler^ value);
    void remove (TapiEventHandler^ value);
}

Value

Type: Traysoft.AddTapiTapiEventHandler
Remarks

ReInit event is fired when a line device configuration has changed, and the application should re-initialize its use of TAPI to become aware of these changes. Upon receiving this event, the application should call Shutdown followed by Initialize(String) as soon as possible.

After ReInit event is fired, all AddTapi.NET methods will return an error until the application re-initializes TAPI. After re-initialization all references to AddTapi.NET object, including TapiLine, TapiAddress and TapiCall objects, will become invalid. After re-initialization the application has to obtain new lines from the Lines collection and call Open(Boolean, TapiCallHandler) to open the lines again.

The application might receive multiple ReInit events. All subsequent ReInit events must be ignored until TAPI is re-initialized by calling Shutdown followed by Initialize(String).

Note Note
The application cannot call Shutdown and Initialize(String) from the ReInit event handler. Those methods have to be called on the main thread of the application. The ReInit event handler should set a flag that re-initialization is required and exit immediately.
See Also

Reference

TapiApp Class
Traysoft.AddTapi Namespace
TapiAppInitialize(String)
TapiAppShutdown


TapiApp.TapiError Event

TapiAppTapiError Event
Occurs when Telephony API (TAPI) error is received while performing an asynchronous operation.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public static event TapiErrorEventHandler TapiError
Public Shared Event TapiError As TapiErrorEventHandler
public:
static  event TapiErrorEventHandler^ TapiError {
    void add (TapiErrorEventHandler^ value);
    void remove (TapiErrorEventHandler^ value);
}

Value

Type: Traysoft.AddTapiTapiErrorEventHandler
Remarks
AddTapi.NET performs some operations asynchronously using background threads. This event is fired when TAPI error occurs during asynchronous operation. The application should report such errors to the user.
Note Note
In Windows Forms and WPF applications AddTapi.NET executes the handler of this event on the main thread of the application (the thread that called Initialize(String)). It is safe to access Windows Forms or WPF controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to handle TapiError event.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiApp.TapiError += OnTapiError;
...

void OnTapiError(object sender, TapiErrorEventArgs args)
{
    // Display the error message
    Console.WriteLine(args.Message);
}
TapiApp.Initialize("MyApp")
AddHandler TapiApp.TapiError, AddressOf OnTapiError
...

Private Sub OnTapiError(ByVal sender As Object, ByVal args As TapiErrorEventArgs)
    ' Display the error message
    Console.WriteLine(args.Message)
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiApp Class


TapiAudioFormat Enumeration

TapiAudioFormat Enumeration
Describes audio formats for audio input/output.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public enum TapiAudioFormat
Public Enumeration TapiAudioFormat
public enum class TapiAudioFormat
Members
Member name | Value | Description
Default | -1 | AddTapi.NET will automatically select audio format supported by the telephony hardware.
PCM_16kHz16BitMono | 23 | 16000 Hz 16 bit mono
PCM_12kHz16BitMono | 24 | 12000 Hz 16 bit mono
PCM_11kHz16BitMono | 25 | 11025 Hz 16 bit mono
PCM_8kHz16BitMono | 26 | 8000 Hz 16 bit mono
PCM_16kHz8BitMono | 32 | 16000 Hz 8 bit mono
PCM_12kHz8BitMono | 33 | 12000 Hz 8 bit mono
PCM_11kHz8BitMono | 34 | 11025 Hz 8 bit mono
PCM_8kHz8BitMono | 35 | 8000 Hz 8 bit mono
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiCall Class

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: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public class TapiCall
Public Class TapiCall
public ref class TapiCall

The TapiCall type exposes the following members.

Properties
 | Name | Description
Public property | Address | Gets a TapiAddress that received the call.
Public property | CallData | Gets the application-settable call data.
Public property | CallDuration | Gets the duration of the call.
Public property | CalledID | Gets the called party's ID (phone number), if available.
Public property | CalledIDName | Gets the called party's name, if available.
Public property | CallerID | Gets the caller's ID (phone number), if available.
Public property | CallerIDName | Gets the caller's name, if available.
Public property | CallID | Gets a numeric identifier (sequence number) of the call.
Public property | ConnectedID | Gets the connected party's ID (phone number), if available.
Public property | ConnectedIDName | Gets the connected party's name, if available.
Public property | ConnectedMode | Gets the substate or mode of the connected call.
Public property | DeviceSpecificInfo | Gets device specific information about the call.
Public property | Direction | Gets a direction of the call (incoming or outgoing).
Public property | DisconnectMode | Gets the disconnect mode (reason) for the disconnected call.
Public property | Display | Gets the telephony system-specific call display information, if available.
Public property | Guid | Gets the globally unique identifier (GUID) of the call.
Public property | Line | Gets a TapiLine that the call is associated with.
Public property | Origin | Gets the origin of the call.
Public property | Privilege | Gets access rights or privileges an application may have to the corresponding call.
Public property | Reason | Gets the reason for the call.
Public property | RedirectingID | Gets the redirecting party's ID (phone number), if available.
Public property | RedirectingIDName | Gets the redirecting party's name, if available.
Public property | RedirectionID | Gets the redirection party's ID (phone number), if available.
Public property | RedirectionIDName | Gets the redirection party's name, if available.
Public property | RelatedCallID | Gets a numeric identifier (sequence number) of the related call.
Public property | State | Gets the state of the call.
Public property | Tag | Gets or sets the object that contains supplemental data about the call.
Public property | Trunk | Gets the number of the trunk over which the call is routed.
Top
Methods
 | Name | Description
Public method | Accept | Accepts offered call.
Public method | AddToConference | Adds the consultation call to the existing conference.
 | Answer | Answers incoming call.
Public method | CompleteTransfer | Completes the transfer of the call to the party connected in the consultation call.
Public method | Dial(String) | Dials the specified number on the existing call.
Public method | Dial(String, Boolean) | Dials the specified number on the existing call.
 | Disconnect | Disconnects the call.
Public method | GatherDigits | Gathers one or more DTMF digits on the call.
Public method | GenerateDigits | Initiates the generation of the specified digits on the call.
Public method | GetCommHandle | Obtains a handle of the open communication port associated with the call.
Public method | Hold | Places the call on hold.
Public method | Park | Performs directed or nondirected park.
Public method | Play(String) | Plays a wave file. Pending speak and play requests are not purged.
Public method | Play(String, Boolean) | Plays a wave file.
 | PrepareAddToConference | Prepares the conference call for the addition of another party.
Public method | Redirect | Redirects the call to the specified destination number.
Public method | RemoveFromConference | Removes the call from the conference.
 | SetupTransfer | Initiates a transfer of the call. It establishes a consultation call, on which the destination of the transfer can be dialed.
Public method | Speak(String) | Speaks the contents of a text string using text synthesis. Pending speak and play requests are not purged.
Public method | Speak(String, Boolean) | Speaks the contents of a text string using text synthesis.
Public method | StartRecording | Starts recording of call audio.
Public method | StopPlayback | Stops currently playing wave file or text-to-speech.
Public method | StopRecording | Stops recording of call audio.
Public method | SwapHold | Swaps the active call with the specified call on consultation hold.
Public method | Transfer | Performs a blind or single-step transfer of the call.
Public method | Unhold | Retrieves the held call.
Public method | WaitForDigit | Waits until either a DTMF digit has been detected or the specified time interval has elapsed.
Public method | WaitForSilence | Waits until either a period of silence has been detected or the specified time interval has elapsed.
Public method | WaitUntilDone | 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.
C#
VB
C++
Copy
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);
}
TapiApp.Initialize("MyApp")
AddHandler TapiApp.IncomingCall, AddressOf OnIncomingCall
...

Private Sub OnIncomingCall(ByVal sender As Object, ByVal args As TapiEventArgs)
    Dim objCall As TapiCall
    objCall = args.Call
    ' Display caller's number to the user
    Console.WriteLine("Incoming call from {0}", objCall.CallerID)
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

Traysoft.AddTapi Namespace
Traysoft.AddTapiTapiCallHandler
TapiLineOpen(Boolean, TapiCallHandler)
TapiLineDial(String, Boolean)


TapiCall Properties

TapiCall Properties

The TapiCall type exposes the following members.

Properties
 | Name | Description
Public property | Address | Gets a TapiAddress that received the call.
Public property | CallData | Gets the application-settable call data.
Public property | CallDuration | Gets the duration of the call.
Public property | CalledID | Gets the called party's ID (phone number), if available.
Public property | CalledIDName | Gets the called party's name, if available.
Public property | CallerID | Gets the caller's ID (phone number), if available.
Public property | CallerIDName | Gets the caller's name, if available.
Public property | CallID | Gets a numeric identifier (sequence number) of the call.
Public property | ConnectedID | Gets the connected party's ID (phone number), if available.
Public property | ConnectedIDName | Gets the connected party's name, if available.
Public property | ConnectedMode | Gets the substate or mode of the connected call.
Public property | DeviceSpecificInfo | Gets device specific information about the call.
Public property | Direction | Gets a direction of the call (incoming or outgoing).
Public property | DisconnectMode | Gets the disconnect mode (reason) for the disconnected call.
Public property | Display | Gets the telephony system-specific call display information, if available.
Public property | Guid | Gets the globally unique identifier (GUID) of the call.
Public property | Line | Gets a TapiLine that the call is associated with.
Public property | Origin | Gets the origin of the call.
Public property | Privilege | Gets access rights or privileges an application may have to the corresponding call.
Public property | Reason | Gets the reason for the call.
Public property | RedirectingID | Gets the redirecting party's ID (phone number), if available.
Public property | RedirectingIDName | Gets the redirecting party's name, if available.
Public property | RedirectionID | Gets the redirection party's ID (phone number), if available.
Public property | RedirectionIDName | Gets the redirection party's name, if available.
Public property | RelatedCallID | Gets a numeric identifier (sequence number) of the related call.
Public property | State | Gets the state of the call.
Public property | Tag | Gets or sets the object that contains supplemental data about the call.
Public property | Trunk | Gets the number of the trunk over which the call is routed.
Top
See Also

Reference

TapiCall Class


TapiCall.Address Property

TapiCallAddress Property
Gets a TapiAddress that received the call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiAddress Address { get; }
Public ReadOnly Property Address As TapiAddress
    Get
public:
property TapiAddress^ Address {
    TapiAddress^ get ();
}

Property Value

Type: TapiAddress
See Also

Reference

TapiCall Class


TapiCall.CallData Property

TapiCallCallData Property
Gets the application-settable call data.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public byte[] CallData { get; }
Public ReadOnly Property CallData As Byte()
    Get
public:
property array<unsigned char>^ CallData {
    array<unsigned char>^ get ();
}

Property Value

Type: Byte
Remarks

Call data is a variably sized buffer that can be used to accumulate information about a call. This information becomes available to all applications that own or monitor the call.

For example, the initial handler of an incoming call might request and enter client account information into a call data buffer, and then subsequent handlers would not have to repeat the request.

Depending on the telephony service provider (TSP), the CallData member can be propagated to all applications monitoring the call, including those on other machines (through the server), and can travel with the call when it is transferred. Not all TSPs support use of this information.

See Also

Reference

TapiCall Class


TapiCall.CallDuration Property

TapiCallCallDuration Property
Gets the duration of the call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TimeSpan CallDuration { get; }
Public ReadOnly Property CallDuration As TimeSpan
    Get
public:
property TimeSpan CallDuration {
    TimeSpan get ();
}

Property Value

Type: TimeSpan
Remarks

Call duration is calculated from the moment the call transitions to the Connected state. CallDuration is set to zero if the call never connected.

See Also

Reference

TapiCall Class


TapiCall.CalledID Property

TapiCallCalledID Property
Gets the called party's ID (phone number), if available.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string CalledID { get; }
Public ReadOnly Property CalledID As String
    Get
public:
property String^ CalledID {
    String^ get ();
}

Property Value

Type: String
A string containing the called-party identifier information. The called party corresponds to the originally addressed party. Contains "Unavail" if the telephony system reports that the party identifier information is not available and will not become available later.
See Also

Reference

TapiCall Class


TapiCall.CalledIDName Property

TapiCallCalledIDName Property
Gets the called party's name, if available.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string CalledIDName { get; }
Public ReadOnly Property CalledIDName As String
    Get
public:
property String^ CalledIDName {
    String^ get ();
}

Property Value

Type: String
See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiCallCalledID


TapiCall.CallerID Property

TapiCallCallerID Property
Gets the caller's ID (phone number), if available.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string CallerID { get; }
Public ReadOnly Property CallerID As String
    Get
public:
property String^ CallerID {
    String^ get ();
}

Property Value

Type: String
A string containing the caller, or originator, party identifier information. Contains "Unavail" if the telephony system reports that the party identifier information is not available and will not become available later.
Remarks
After a new incoming call is detected, AddTapi.NET waits up to 3 seconds for Caller ID information to arrive before reporting or answering new incoming call. Set WaitForCallerID property to false if you do not want AddTapi.NET to wait for Caller ID and process new incoming calls immediately. In this case CallerID property may contain null reference (Nothing in Visual Basic) when an IncomingCall event is fired. Caller's ID might become available a few seconds later and the CallerID property will change its value to the received caller's ID. Please note that some voice modems do not support Caller ID.
See Also

Reference

TapiCall Class


TapiCall.CallerIDName Property

TapiCallCallerIDName Property
Gets the caller's name, if available.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string CallerIDName { get; }
Public ReadOnly Property CallerIDName As String
    Get
public:
property String^ CallerIDName {
    String^ get ();
}

Property Value

Type: String
See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiCallCallerID


TapiCall.CallID Property

TapiCallCallID Property
Gets a numeric identifier (sequence number) of the call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public int CallID { get; }
Public ReadOnly Property CallID As Integer
    Get
public:
property int CallID {
    int get ();
}

Property Value

Type: Int32
A numeric identifier assigned by the telephony system to this call.
Remarks
Some telephony systems can assign a unique identifier to each call. This allows the call to be tracked across transfers, redirects, or other events. If this feature is not supported, the CallID property is zero for all calls.
See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiCallRelatedCallID


TapiCall.ConnectedID Property

TapiCallConnectedID Property
Gets the connected party's ID (phone number), if available.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string ConnectedID { get; }
Public ReadOnly Property ConnectedID As String
    Get
public:
property String^ ConnectedID {
    String^ get ();
}

Property Value

Type: String
A string containing the connected party identifier information. The connected party is the party that was actually connected to. This may be different from the called-party ID if the call was diverted. Contains "Unavail" if the telephony system reports that the party identifier information is not available and will not become available later.
See Also

Reference

TapiCall Class


TapiCall.ConnectedIDName Property

TapiCallConnectedIDName Property
Gets the connected party's name, if available.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string ConnectedIDName { get; }
Public ReadOnly Property ConnectedIDName As String
    Get
public:
property String^ ConnectedIDName {
    String^ get ();
}

Property Value

Type: String
See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiCallConnectedID


TapiCall.ConnectedMode Property

TapiCallConnectedMode Property
Gets the substate or mode of the connected call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiConnectedMode ConnectedMode { get; }
Public ReadOnly Property ConnectedMode As TapiConnectedMode
    Get
public:
property TapiConnectedMode ConnectedMode {
    TapiConnectedMode get ();
}

Property Value

Type: TapiConnectedMode
Remarks

The ConnectedMode property describes a mode of the connected call. This property becomes available to the application after the call state transitions to Connected. This property is used when the call is on an address that is shared (bridged) with other stations.

The Active and Inactive values are used when the call is on an address that is shared with other stations (bridged configuration). If the connected mode is "active," it means that the call is connected at the current station (the current station is a participant in the call). If the connected mode is Unknown (zero), the application should assume that the value is "active" (which would be the situation on a non-bridged address). If the connected mode is "inactive," the call is active at one or more other stations, but the current station is not a participant in the call. The mode can switch between Active and Inactive during a call if the user joins and leaves the call through manual action.

In such a bridged situation, a Disconnect or Hold operation may possibly not actually disconnect the call or place it on hold, because the status of other stations on the call may govern (for example, attempting to "hold" a call when other stations are participating will not be possible); instead, the call can simply be changed to the Inactive mode if it remains connected at other stations. A call in the Inactive state can be joined using the Answer.

Many operations that are valid in calls in the connected state can be impossible in the Inactive mode, such as monitoring for digits or audio playback/recording, because the station is not actually participating in the call; monitoring is usually suspended (although not canceled) while the call is in the Inactive mode.

See Also

Reference

TapiCall Class


TapiCall.DeviceSpecificInfo Property

TapiCallDeviceSpecificInfo Property
Gets device specific information about the call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public byte[] DeviceSpecificInfo { get; }
Public ReadOnly Property DeviceSpecificInfo As Byte()
    Get
public:
property array<unsigned char>^ DeviceSpecificInfo {
    array<unsigned char>^ get ();
}

Property Value

Type: Byte
Remarks

Many TSPs provide functionality specific to the telephony system using device specific extensions. Please refer to the TAPI documentation for the telephony hardware to find out about device specific functionality supported by the telephony service provider.

DeviceSpecificInfo property allows the application to retrieve device specific information about the call. The information provided in DeviceSpecificInfo property is described in TAPI documentation for the telephony hardware.

The application has to negotiate a version of the extension supported by the line device using NegotiateDeviceSpecificExtensionVersion(UInt32, UInt32) before opening the line in order to use device specific functionality.

See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiLineNegotiateDeviceSpecificExtensionVersion(UInt32, UInt32)
TapiLineDeviceSpecific(Object, TapiAddress, TapiCall, Type)


TapiCall.Direction Property

TapiCallDirection Property
Gets a direction of the call (incoming or outgoing).

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCallDirection Direction { get; }
Public ReadOnly Property Direction As TapiCallDirection
    Get
public:
property TapiCallDirection Direction {
    TapiCallDirection get ();
}

Property Value

Type: TapiCallDirection
See Also

Reference

TapiCall Class


TapiCall.DisconnectMode Property

TapiCallDisconnectMode Property
Gets the disconnect mode (reason) for the disconnected call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiDisconnectMode DisconnectMode { get; }
Public ReadOnly Property DisconnectMode As TapiDisconnectMode
    Get
public:
property TapiDisconnectMode DisconnectMode {
    TapiDisconnectMode get ();
}

Property Value

Type: TapiDisconnectMode
See Also

Reference

TapiCall Class


TapiCall.Display Property

TapiCallDisplay Property
Gets the telephony system-specific call display information, if available.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string Display { get; }
Public ReadOnly Property Display As String
    Get
public:
property String^ Display {
    String^ get ();
}

Property Value

Type: String
A string containing call display information provided by the telephony system. Some telephony service providers supply additional call information in Display field. Most telephony systems do not use this field.
See Also

Reference

TapiCall Class


TapiCall.Guid Property

TapiCallGuid Property
Gets the globally unique identifier (GUID) of the call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public Guid Guid { get; }
Public ReadOnly Property Guid As Guid
    Get
public:
property Guid Guid {
    Guid get ();
}

Property Value

Type: Guid
An unique identifier assigned by AddTapi.NET to the call.
Remarks
AddTapi.NET assigns an unique identifier to each call. The application can use Guid property to keep track of the call through all call-related events or to store call information in a database.
See Also

Reference

TapiCall Class


TapiCall.Line Property

TapiCallLine Property
Gets a TapiLine that the call is associated with.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiLine Line { get; }
Public ReadOnly Property Line As TapiLine
    Get
public:
property TapiLine^ Line {
    TapiLine^ get ();
}

Property Value

Type: TapiLine
See Also

Reference

TapiCall Class


TapiCall.Origin Property

TapiCallOrigin Property
Gets the origin of the call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCallOrigin Origin { get; }
Public ReadOnly Property Origin As TapiCallOrigin
    Get
public:
property TapiCallOrigin Origin {
    TapiCallOrigin get ();
}

Property Value

Type: TapiCallOrigin
One of the TapiCallOrigin constants describing the origin of the call.
Remarks
Please note that some telephony service providers do not report the origin of the call. The Origin property is TapiCallOrigin.Unavail in this case.
See Also

Reference

TapiCall Class


TapiCall.Privilege Property

TapiCallPrivilege Property
Gets access rights or privileges an application may have to the corresponding call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCallPrivilege Privilege { get; }
Public ReadOnly Property Privilege As TapiCallPrivilege
    Get
public:
property TapiCallPrivilege Privilege {
    TapiCallPrivilege get ();
}

Property Value

Type: TapiCallPrivilege
TapiCallPrivilege bit-flags describing call privileges of the application.
Remarks
When a new call is first provided to an application, Privilege property contains initial privileges that the application has for the call. Whenever privileges of the application are modified, the TapiApp.CallState event is sent to the application.
See Also

Reference

TapiCall Class


TapiCall.Reason Property

TapiCallReason Property
Gets the reason for the call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCallReason Reason { get; }
Public ReadOnly Property Reason As TapiCallReason
    Get
public:
property TapiCallReason Reason {
    TapiCallReason get ();
}

Property Value

Type: TapiCallReason
One of the TapiCallReason constants describing the reason why the call occured.
Remarks
Please note that some telephony service providers do not report the reason for the call. The Reason property is TapiCallReason.Unavail in this case.
See Also

Reference

TapiCall Class


TapiCall.RedirectingID Property

TapiCallRedirectingID Property
Gets the redirecting party's ID (phone number), if available.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string RedirectingID { get; }
Public ReadOnly Property RedirectingID As String
    Get
public:
property String^ RedirectingID {
    String^ get ();
}

Property Value

Type: String
A string containing the redirecting party identifier information. The redirecting party identifies the number which redirects the call. Contains "Unavail" if the telephony system reports that the party identifier information is not available and will not become available later.
See Also

Reference

TapiCall Class


TapiCall.RedirectingIDName Property

TapiCallRedirectingIDName Property
Gets the redirecting party's name, if available.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string RedirectingIDName { get; }
Public ReadOnly Property RedirectingIDName As String
    Get
public:
property String^ RedirectingIDName {
    String^ get ();
}

Property Value

Type: String
See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiCallRedirectingID


TapiCall.RedirectionID Property

TapiCallRedirectionID Property
Gets the redirection party's ID (phone number), if available.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string RedirectionID { get; }
Public ReadOnly Property RedirectionID As String
    Get
public:
property String^ RedirectionID {
    String^ get ();
}

Property Value

Type: String
A string containing the redirection party identifier information. The redirection party identifies the number to which the call was redirected. Contains "Unavail" if the telephony system reports that the party identifier information is not available and will not become available later.
See Also

Reference

TapiCall Class


TapiCall.RedirectionIDName Property

TapiCallRedirectionIDName Property
Gets the redirection party's name, if available.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string RedirectionIDName { get; }
Public ReadOnly Property RedirectionIDName As String
    Get
public:
property String^ RedirectionIDName {
    String^ get ();
}

Property Value

Type: String
See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiCallRedirectionID


TapiCall.RelatedCallID Property

TapiCallRelatedCallID Property
Gets a numeric identifier (sequence number) of the related call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public int RelatedCallID { get; }
Public ReadOnly Property RelatedCallID As Integer
    Get
public:
property int RelatedCallID {
    int get ();
}

Property Value

Type: Int32
A numeric identifier assigned by the telephony system to the related call.
Remarks
Telephony systems that use the call ID often may find it necessary to relate one call to another. RelatedCallID may be used by the telephony service provider for this purpose.
See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiCallCallID


TapiCall.State Property

TapiCallState Property
Gets the state of the call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCallState State { get; }
Public ReadOnly Property State As TapiCallState
    Get
public:
property TapiCallState State {
    TapiCallState get ();
}

Property Value

Type: TapiCallState
See Also

Reference

TapiCall Class


TapiCall.Tag Property

TapiCallTag Property
Gets or sets the object that contains supplemental data about the call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public Object Tag { get; set; }
Public Property Tag As Object
    Get
    Set
public:
property Object^ Tag {
    Object^ get ();
    void set (Object^ value);
}

Property Value

Type: Object
An Object that contains data about the call. The default is a null reference (Nothing in Visual Basic).
Remarks
Any type derived from the Object class can be assigned to this property. The application can use Tag property to store data closely associated with the call or the caller for easy access in all call-related events. For example, it can store caller's account number in the Tag property so the account information can be accessed quickly. AddTapi.NET does not use this property internally. This property provides a place for the application to store its own data.
See Also

Reference

TapiCall Class


TapiCall.Trunk Property

TapiCallTrunk Property
Gets the number of the trunk over which the call is routed.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public int Trunk { get; }
Public ReadOnly Property Trunk As Integer
    Get
public:
property int Trunk {
    int get ();
}

Property Value

Type: Int32
A number identifying the trunk over which the call is routed. -1 if unknown.
Remarks
The application can use Trunk property to find out which trunk the call is routed over. This property is used for both incoming and outgoing calls. Trunk property is set to -1 if the trunk is unknown.
See Also

Reference

TapiCall Class


TapiCall Methods

TapiCall Methods

The TapiCall type exposes the following members.

Methods
 | Name | Description
Public method | Accept | Accepts offered call.
Public method | AddToConference | Adds the consultation call to the existing conference.
 | Answer | Answers incoming call.
Public method | CompleteTransfer | Completes the transfer of the call to the party connected in the consultation call.
Public method | Dial(String) | Dials the specified number on the existing call.
Public method | Dial(String, Boolean) | Dials the specified number on the existing call.
 | Disconnect | Disconnects the call.
Public method | GatherDigits | Gathers one or more DTMF digits on the call.
Public method | GenerateDigits | Initiates the generation of the specified digits on the call.
Public method | GetCommHandle | Obtains a handle of the open communication port associated with the call.
Public method | Hold | Places the call on hold.
Public method | Park | Performs directed or nondirected park.
Public method | Play(String) | Plays a wave file. Pending speak and play requests are not purged.
Public method | Play(String, Boolean) | Plays a wave file.
 | PrepareAddToConference | Prepares the conference call for the addition of another party.
Public method | Redirect | Redirects the call to the specified destination number.
Public method | RemoveFromConference | Removes the call from the conference.
 | SetupTransfer | Initiates a transfer of the call. It establishes a consultation call, on which the destination of the transfer can be dialed.
Public method | Speak(String) | Speaks the contents of a text string using text synthesis. Pending speak and play requests are not purged.
Public method | Speak(String, Boolean) | Speaks the contents of a text string using text synthesis.
Public method | StartRecording | Starts recording of call audio.
Public method | StopPlayback | Stops currently playing wave file or text-to-speech.
Public method | StopRecording | Stops recording of call audio.
Public method | SwapHold | Swaps the active call with the specified call on consultation hold.
Public method | Transfer | Performs a blind or single-step transfer of the call.
Public method | Unhold | Retrieves the held call.
Public method | WaitForDigit | Waits until either a DTMF digit has been detected or the specified time interval has elapsed.
Public method | WaitForSilence | Waits until either a period of silence has been detected or the specified time interval has elapsed.
Public method | WaitUntilDone | Waits until either all pending speak and play requests have completed or the specified time interval has elapsed.
Top
See Also

Reference

TapiCall Class


TapiCall.Accept Method

TapiCallAccept Method
Accepts offered call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void Accept()
Public Sub Accept
public:
void Accept()
Exceptions
Exception | Condition
TapiException | The call was not accepted because a TAPI error occurred.
Remarks

On some telephony systems incoming calls are first offered on one or more lines (phone extensions). For some small amount of time, the application may have the option to reject the call using Disconnect, redirect the call to another extension using Redirect(String), or accept the call using Accept. After a call has been successfully accepted by an application, alerting begins at the extension that accepted the call.

Please note that Accept is an asynchronous operation. Accept method instructs telephony system to accept the call. When telephony system finishes accepting the call, the state of the call changes to TapiCallState.Accepted and CallState event is fired.

See Also

Reference

TapiCall Class


TapiCall.AddToConference Method

TapiCallAddToConference Method
Adds the consultation call to the existing conference.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void AddToConference(
    TapiCall conferenceCall
)
Public Sub AddToConference (
    conferenceCall As TapiCall
)
public:
void AddToConference(
    TapiCall^ conferenceCall
)

Parameters

conferenceCall
Type: Traysoft.AddTapiTapiCall
object representing the conference call. The call state of the conferenceCall must be OnHoldPendingConference or OnHold.
Exceptions
Exception | Condition
TapiException | The call was not added to the conference because a TAPI error occurred.
Remarks

AddToConference method adds the call represented by this object to the conference call specified by conferenceCall. Call state of conferenceCall must be OnHoldPendingConference or OnHold. The state of the call to be added to the conference must be Connected, OnHold, Proceeding or Ringback. Many PBXs allow calls to be added to conferences before they are actually answered.

The conference call is established either by SetupConference(TapiCall, TapiCall, Int32) or CompleteTransfer(TapiCall, Boolean) resolved as a 3-way conference. The call added to a conference is typically established using SetupConference(TapiCall, TapiCall, Int32) or PrepareAddToConference. 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.

All calls that are part of a conference must exist on the same open line.
See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
Traysoft.AddTapiTapiCall
TapiLineSetupConference(TapiCall, TapiCall, Int32)
TapiCallPrepareAddToConference
TapiCallRemoveFromConference
TapiCallCompleteTransfer(TapiCall, Boolean)


TapiCall.Answer Method

TapiCallAnswer Method
Answers incoming call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void Answer()
Public Sub Answer
public:
void Answer()
Exceptions
Exception | Condition
TapiException | The call was not answered because a TAPI error occurred.
Remarks

AddTapi.NET answers all incoming calls automatically if RingsToAnswer is greater than zero. The application can set RingsToAnswer to zero and use Answer method if it needs to answer specific calls instead of all calls.

Answer is an asynchronous operation. Answer method requests the call to be answered and returns immediately. Telephony hardware will answer the call within a few seconds after the Answer call. AddTapi.NET fires CallConnected event and executes TapiCallHandler passed to Open(Boolean, TapiCallHandler) when the call is answered and connection is established.

Examples
The following code shows how to use Answer method to answer calls from a specific number. The error handling was omitted for clarity.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiApp.IncomingCall += OnIncomingCall;
TapiLine line = TapiApp.Lines[0];
line.Open(true, CallHandler);
line.RingsToAnswer = 0;
...

void OnIncomingCall(object sender, TapiEventArgs args)
{
    TapiCall call = args.Call;
    // Answer calls from 555-123-4567
    if (call.CallerID == "5551234567")
    {
        call.Answer();
    }
}

// This method will be called when incoming call is answered
private void CallHandler(TapiCall call)
{
    call.Play("welcome.wav");
    call.Speak("Press 1 to hear the current time. Press any other button to disconnect.");
    if(call.WaitForDigit(20) == "1")
    {
        call.Speak(DateTime.Now.ToString());
        call.WaitUntilDone(10);
    }
    call.Disconnect();
}
TapiApp.Initialize("MyApp")
AddHandler TapiApp.IncomingCall, AddressOf OnIncomingCall
Dim objLine As TapiLine
objLine = TapiApp.Lines(0)
objLine.Open(True, AddressOf CallHandler)
objLine.RingsToAnswer = 0;
...

Private Sub OnIncomingCall(ByVal sender As Object, ByVal args As TapiEventArgs)
    Dim objCall As TapiCall
    objCall = args.Call
    ' Answer calls from 555-123-4567
    If objCall.CallerID = "5551234567" Then
        objCall.Answer()
    End If
End Sub

' This method will be called when incoming call is answered
Private Sub CallHandler(ByVal objCall As TapiCall)
    objCall.Play("welcome.wav")
    objCall.Speak("Press 1 to hear the current time. Press any other button to disconnect.")
    If objCall.WaitForDigit(20) = "1" Then
        objCall.Speak(DateTime.Now.ToString())
        objCall.WaitUntilDone(10)
    End If
    objCall.Disconnect()
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiLineOpen(Boolean, TapiCallHandler)
TapiLineRingsToAnswer


TapiCall.CompleteTransfer Method

TapiCallCompleteTransfer Method
Completes the transfer of the call to the party connected in the consultation call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCall CompleteTransfer(
    TapiCall consultationCall,
    bool as3WayConference
)
Public Function CompleteTransfer (
    consultationCall As TapiCall,
    as3WayConference As Boolean
) As TapiCall
public:
TapiCall^ CompleteTransfer(
    TapiCall^ consultationCall,
    bool as3WayConference
)

Parameters

consultationCall
Type: Traysoft.AddTapiTapiCall
TapiCall object that represents a connection with the destination of the transfer. Usually this is a call object returned from SetupTransfer.
as3WayConference
Type: SystemBoolean
Specifies how the initiated transfer request is to be resolved. If true, the transfer is resolved by establishing a three-way conference between the application, the party connected to the initial call, and the party connected to the consultation call. A conference call is created when this option is selected. If false, the transfer is resolved by transferring the initial call to the consultation call. Both calls will become idle to the application.

Return Value

Type: TapiCall
A newly created conference call if as3WayConference parameter is true, null (Nothing in Visual Basic) otherwise.
Exceptions
Exception | Condition
TapiException | The transfer was not completed because a TAPI error occurred.
Remarks

This operation completes the transfer of the original call, to the party currently connected by consultationCall. The consultation call is typically dialed on the consultation call returned from SetupTransfer, but it can be any call to which the switch is capable of transferring the call.

The transfer request can be resolved either as a transfer or as a three-way conference call. When resolved as a transfer, the parties connected by the call and consultationCall are connected to each other, and both this call and consultationCall are typically cleared from the application's line and transition to the idle state.

When resolved as a conference, all three parties enter into a conference call. Both existing calls remain valid but transition to the Conferenced state. A conference call is created and returned, and it transitions to the Connected state.

The application can also transfer calls in a single step, without having to deal with the intervening consultation call, by using Transfer(String).

See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiCallSetupTransfer


TapiCall.Dial Method

TapiCallDial Method
Overload List
 | Name | Description
Public method | Dial(String) | Dials the specified number on the existing call.
Public method | Dial(String, Boolean) | Dials the specified number on the existing call.
Top
See Also

Reference

TapiCall Class


TapiCall.Dial Method (String)

TapiCallDial Method (String)
Dials the specified number on the existing call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void Dial(
    string number
)
Public Sub Dial (
    number As String
)
public:
void Dial(
    String^ number
)

Parameters

number
Type: SystemString
Number to dial. The number uses the standard dialable number format.
Exceptions
Exception | Condition
TapiException | The number was not dialed because a TAPI error occurred.
Remarks

The Dial method is used for dialing on an existing call. For example, after a call has been set up for transfer or conference, a consultation call is automatically created, and the TapiCall.Dial method would be used to perform the dialing of this consultation call. The TapiCall.Dial method can be invoked multiple times in the course of multistage dialing, if the hardware allows it.

The TapiCall.Dial method can also be used in partial dialing. To initiate a call using partial dialing, the application calls TapiLine.Dial(string,bool) and specifies a partial dialing string. A partial dial string is any dial string terminated by a semicolon. The call will typically transition to TapiCallState.Dialing after which TapiCall.Dial can be called to specify more dialing strings, each terminated by a semicolon. Dialing is completed by calling TapiCall.Dial with a dial string that is not terminated with a semicolon (such as an empty string). This technique allows applications to perform interactive partial dialing with the user or enable more sophisticated dialing.

The TapiCall.Dial method is only available when a call is in TapiCallState.Dialing or TapiCallState.Dialtone state. If DTMF is needed while a call is connected, use TapiCall.GenerateDigits.
See Also

Reference

TapiCall Class
Dial Overload
Traysoft.AddTapi Namespace
TapiLineDial(String, Boolean)


TapiCall.Dial Method (String, Boolean)

TapiCallDial Method (String, Boolean)
Dials the specified number on the existing call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void Dial(
    string number,
    bool useDialingRules
)
Public Sub Dial (
    number As String,
    useDialingRules As Boolean
)
public:
void Dial(
    String^ number,
    bool useDialingRules
)

Parameters

number
Type: SystemString
A string that contains a number to dial.
useDialingRules
Type: SystemBoolean
Indicates if the dialing rules specified in the Control Panel should be applied.
Exceptions
Exception | Condition
TapiException | The number was not dialed because a TAPI error occurred.
Remarks

The Dial method is used for dialing on an existing call. For example, after a call has been set up for transfer or conference, a consultation call is automatically created, and the TapiCall.Dial method would be used to perform the dialing of this consultation call. The TapiCall.Dial method can be invoked multiple times in the course of multistage dialing, if the hardware allows it.

The TapiCall.Dial method can also be used in partial dialing. To initiate a call using partial dialing, the application calls TapiLine.Dial(string,bool) and specifies a partial dialing string. A partial dial string is any dial string terminated by a semicolon. The call will typically transition to TapiCallState.Dialing after which TapiCall.Dial can be called to specify more dialing strings, each terminated by a semicolon. Dialing is completed by calling TapiCall.Dial with a dial string that is not terminated with a semicolon (such as an empty string). This technique allows applications to perform interactive partial dialing with the user or enable more sophisticated dialing.

The TapiCall.Dial method is only available when a call is in TapiCallState.Dialing or TapiCallState.Dialtone state. If DTMF is needed while a call is connected, use TapiCall.GenerateDigits.
See Also

Reference

TapiCall Class
Dial Overload
Traysoft.AddTapi Namespace
TapiLineDial(String, Boolean)


TapiCall.Disconnect Method

TapiCallDisconnect Method
Disconnects the call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void Disconnect()
Public Sub Disconnect
public:
void Disconnect()
Remarks

Disconnect is an asynchronous operation. Disconnect method requests disconnect and returns immediately. The call is disconnected by the telephony hardware within a few second after the Disconnect call. AddTapi.NET fires CallDisconnected event when the call is actually disconnected.

If the call is in the connected state (Connected), this method drops the connection and releases the line (equivalent to hanging up the phone). If the call is in the dialing state (Dialing), this method aborts the dialing and releases the line.

The application should always call Disconnect before returning from the TapiCallHandler method if the call is no longer needed and should be disconnected. If Disconnect is not called the line will not be released and will not be available to handle future calls. The best way to ensure that the Disconnect is called is to put it into the finally block. Please refer to the following code snapshot and AddTapi.NET samples for details.
Examples
The following code shows how to use Disconnect method in the TapiCallHandler.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiLine line = TapiApp.Lines[0];
line.Open(true, CallHandler);
line.RingsToAnswer = 1;
...

// This method will be called when incoming call is answered
private void CallHandler(TapiCall call)
{
    try
    {
        call.Play("message.wav");
        call.WaitUntilDone(60);
    }
    catch (TapiDisconnectException)
    {
        // Remote party hung up
    }
    catch (Exception exc)
    {
        // An error occurred
    }
    finally
    {
        // Disconnect the call to clear up the line
        call.Disconnect();
    }
}
TapiApp.Initialize("MyApp")
Dim objLine As TapiLine
objLine = TapiApp.Lines(0)
objLine.Open(True, AddressOf CallHandler)
objLine.RingsToAnswer = 1;
...

' This method will be called when incoming call is answered
Private Sub CallHandler(ByVal objCall As TapiCall)
    Try
        objCall.Play("message.wav")
        objCall.WaitUntilDone(60)
    Catch exc As TapiDisconnectException
        ' Remote party hung up
    Catch exc As Exception
        ' An error occurred
    Finally
        ' Disconnect the call to clear up the line
        objCall.Disconnect()
    End Try
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
Traysoft.AddTapiTapiCallHandler
TapiAppCallDisconnected


TapiCall.GatherDigits Method

TapiCallGatherDigits Method
Gathers one or more DTMF digits on the call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string GatherDigits(
    int numDigits,
    string terminationDigits,
    int firstDigitTimeoutSeconds,
    int interDigitTimeoutSeconds
)
Public Function GatherDigits (
    numDigits As Integer,
    terminationDigits As String,
    firstDigitTimeoutSeconds As Integer,
    interDigitTimeoutSeconds As Integer
) As String
public:
String^ GatherDigits(
    int numDigits,
    String^ terminationDigits,
    int firstDigitTimeoutSeconds,
    int interDigitTimeoutSeconds
)

Parameters

numDigits
Type: SystemInt32
The number of digits to be collected.
terminationDigits
Type: SystemString
A string of termination digits as text characters. If one of the digits in the string is detected, that termination digit is appended to the buffer, digit collection is terminated, and the buffer is returned to the application.
firstDigitTimeoutSeconds
Type: SystemInt32
Time duration in seconds in which the first digit is expected. Negative value means that the timeout should start after playback initiated by Play(String) or Speak(String) is completed. If the first digit is not received in this timeframe, digit collection is terminated and null reference (Nothing in Visual Basic) is returned to the application.
interDigitTimeoutSeconds
Type: SystemInt32
Maximum time duration in seconds between consecutive digits. If no digit is received in this timeframe, digit collection is terminated and the digits collected up to this point are returned to the application.

Return Value

Type: String
A string that contains gathered digits. The returned string contains detected termination digit, if any. If the first digit was not received within firstDigitTimeoutSeconds seconds, this method returns null reference (Nothing in Visual Basic).
Exceptions
Exception | Condition
TapiDisconnectException | The call has been disconnected while waiting for a digit.
Remarks
This method gathers DTMF digits (buttons) pressed by remote party on a touch-tone phone. The application can use this method to gather a fixed number of digits or to gather a variable number of digits followed by a termination digit. For example, if the application expects the caller to enter an 8-digit account number, set numDigits parameter to 8 and terminationDigits to null (Nothing in Visual Basic). In this case GatherDigits will terminate when the caller enters exactly 8 digits (or when one of the timeouts expires). If the application expects a pin code that has 4 to 6 digits followed by the # key, set numDigits to 7 (6 digits for a pin code plus # key) and terminationDigits to "#". In this case GatherDigits will terminate when the caller presses the # key or enters 7 digits (or when one of the timeouts expires). The application can check returned string to determine how many digits where entered. Please note that GatherDigits ignores the digits received before the application called this method.
See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiCallWaitForDigit(Int32)


TapiCall.GenerateDigits Method

TapiCallGenerateDigits Method
Initiates the generation of the specified digits on the call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void GenerateDigits(
    string digits
)
Public Sub GenerateDigits (
    digits As String
)
public:
void GenerateDigits(
    String^ digits
)

Parameters

digits
Type: SystemString
A string that contains the digits to be generated.
Exceptions
Exception | Condition
TapiDisconnectException | The call has been already disconnected.
TapiException | AddTapi.NET cannot generate the digits because a TAPI error occurred.
Remarks

This method generates the specified digits as inband tones using DTMF signaling. Valid digits are 0 through 9, '*', '#', 'A', 'B', 'C', and 'D'. In addition, the comma (,) is also a valid character. A comma injects an extra delay between the signaling of the previous and next digits it separates. The duration of this pause is hardware dependent (usually 500 ms). Multiple commas can be used to inject longer pauses. The exclamation (!) is a valid character. This character causes a "hookflash" operation (one-half second onhook, followed by one-half second offhook before continuing). The application can use GenerateDigits to perform call transfer by generating a sequence of digits that instructs the PBX to transfer a call.

Please note that GenerateDigits is an asynchronous operation. GenerateDigits queues the digits to generate and returns immediately. The telephony hardware will start digit generation after the method returns. After all digits have been generated, or after digit generation has been aborted or canceled, a Generated event is fired.

Only one inband generation request (tone generation or digit generation) is allowed to be in progress per call across all applications that are owners of the call. Digit generation on a call is canceled by initiating either another digit generation request or a tone generation request. To cancel the current digit generation, the application can call GenerateDigits and specify null (Nothing in Visual Basic for the digits parameter.

See Also

Reference

TapiCall Class


TapiCall.GetCommHandle Method

TapiCallGetCommHandle Method
Obtains a handle of the open communication port associated with the call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public IntPtr GetCommHandle()
Public Function GetCommHandle As IntPtr
public:
IntPtr GetCommHandle()

Return Value

Type: IntPtr
IntPtr that incapsulates a Win32 handle of the open communication port.
Exceptions
Exception | Condition
TapiDisconnectException | The call has been already disconnected.
TapiException | AddTapi.NET cannot obtain a handle because a TAPI error occurred.
Remarks

GetCommHandle obtains a handle of the open communication port of the data modem. Returned handle can be used to transfer data between the application and the remote terminal. The telephony service provider opens the port in overlapped I/O mode and configures the port using the settings specified in the Control Panel. The application can set additional configuration options for the device by using communications functions with the returned handle.

The application assumes ownership of the returned handle. The handle must be closed using CloseHandle Win32 function before the call is disconnected (before calling Disconnect). We recommend using SafeFileHandle wrapper to manage the returned handle.

See Also

Reference

TapiCall Class


TapiCall.Hold Method

TapiCallHold Method
Places the call on hold.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void Hold()
Public Sub Hold
public:
void Hold()
Exceptions
Exception | Condition
TapiException | The call was not put on hold because a TAPI error occurred.
Remarks

The call on hold is temporarily disconnected allowing the application to use the line device for making or answering other calls. Use Unhold to retrieve the held call. The telephony hardware must support "hard hold" function for Hold method to work. Regular voice modems do not support this function.

Please note that Hold is an asynchronous operation. Hold method instructs telephony system to put the call on hold. When telephony system finishes putting the call on hold, the state of the call changes to TapiCallState.OnHold and CallState event is fired. If the held party hangs up while on hold, the call transitions to the TapiCallState.Disconnected state.

See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiCallUnhold


TapiCall.Park Method

TapiCallPark Method
Performs directed or nondirected park.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string Park(
    string number
)
Public Function Park (
    number As String
) As String
public:
String^ Park(
    String^ number
)

Parameters

number
Type: SystemString
Number where the call is to be parked when using directed park. This paramater should be null (Nothing in Visual Basic) for nondirected park.

Return Value

Type: String
For nondirected park, the number where the call is parked is returned.
Exceptions
Exception | Condition
TapiException | The call was not parked because a TAPI error occurred.
Remarks

With directed park, the application determines the number at which it wants to park the call. With nondirected park, the switch determines the number and provides this to the application. In either case, a parked call can be unparked using Unpark(String) by specifying this number.

The parked call typically enters the idle state after it has been successfully parked, and the application should release the reference to the corresponding TapiCall object. When the application performs a Unpark(String) on the parked call, a new TapiCall object is created for the unparked call.

See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiLineUnpark(String)


TapiCall.Play Method

TapiCallPlay Method
Overload List
 | Name | Description
Public method | Play(String) | Plays a wave file. Pending speak and play requests are not purged.
Public method | Play(String, Boolean) | Plays a wave file.
Top
See Also

Reference

TapiCall Class


TapiCall.Play Method (String)

TapiCallPlay Method (String)
Plays a wave file. Pending speak and play requests are not purged.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void Play(
    string file
)
Public Sub Play (
    file As String
)
public:
void Play(
    String^ file
)

Parameters

file
Type: SystemString
Filename (including path) of the file to be played.
Exceptions
Exception | Condition
TapiDisconnectException | The call has been already disconnected.
Remarks

Play method plays a wave file (file with .WAV extension) on the call. file parameter should contain a fully-qualified name (including path) of the file to be played. AddTapi.NET supports all wave formats that can be played in Windows, including compressed formats for which the codecs are installed. For best results we recommend uncompressed 16-bit mono files with 22KHz or higher sampling rate.

Play is asynchronous and returns immediately after the play request is queued. AddTapi.NET will play and speak queued Play and Speak(String, Boolean) requests in the same order they were queued. The file passed to this Play call will be played after all outstaning speak and play requests are completed. Use WaitUntilDone(Int32) method to find out if all speak and play requests are completed or to wait until all requests are completed. If you want to purge all outstanding requests and start to play the file immediately, use Play(String, Boolean) and set purgeBeforeSpeak parameter to true.

See Also

Reference

TapiCall Class
Play Overload
Traysoft.AddTapi Namespace
TapiCallPlay(String, Boolean)
TapiCallWaitUntilDone(Int32)


TapiCall.Play Method (String, Boolean)

TapiCallPlay Method (String, Boolean)
Plays a wave file.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void Play(
    string file,
    bool purgeBeforePlay
)
Public Sub Play (
    file As String,
    purgeBeforePlay As Boolean
)
public:
void Play(
    String^ file,
    bool purgeBeforePlay
)

Parameters

file
Type: SystemString
Filename (including path) of the file to be played.
purgeBeforePlay
Type: SystemBoolean
Indicates whether to purge all pending speak and play requests prior to this play call.
Exceptions
Exception | Condition
TapiDisconnectException | The call has been already disconnected.
Remarks

Play method plays a wave file (file with .WAV extension) on the call. file parameter should contain a fully-qualified name (including path) of the file to be played. AddTapi.NET supports all wave formats that can be played in Windows, including compressed formats for which the codecs are installed. For best results we recommend uncompressed 16-bit mono files with 22KHz or higher sampling rate.

Play is asynchronous and returns immediately after the play request is queued. AddTapi.NET will play and speak queued Play and Speak(String, Boolean) requests in the same order they were queued. Use WaitUntilDone(Int32) method to find out if all speak and play requests are completed or to wait until all requests are completed. If purgeBeforeSpeak parameter is true, Play clears the queue and removes all pending speak and play requests prior to this play call. In effect, Play call with purgeBeforeSpeak set to true stops the currently playing file or text and starts playing the new file passed in file parameter.

See Also

Reference

TapiCall Class
Play Overload
Traysoft.AddTapi Namespace
TapiCallSpeak(String, Boolean)
TapiCallWaitUntilDone(Int32)


TapiCall.PrepareAddToConference Method

TapiCallPrepareAddToConference Method
Prepares the conference call for the addition of another party.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCall PrepareAddToConference()
Public Function PrepareAddToConference As TapiCall
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
Exception | Condition
TapiException | The 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.
C#
VB
C++
Copy
// 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);
' 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
Dim consultationCall as TapiCall
consultationCall = conferenceCall.PrepareAddToConference()
System.Threading.Thread.Sleep(500)
If consultationCall.State = TapiCallState.DialTone Then
  consultationCall.Dial("201")
Else
  ' Error, consultation call is not in dialtone state
EndIf
' 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)

No code example is currently available or this language may not be supported.

See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiLineSetupConference(TapiCall, TapiCall, Int32)
TapiCallAddToConference(TapiCall)
TapiCallRemoveFromConference
TapiCallCompleteTransfer(TapiCall, Boolean)


TapiCall.Redirect Method

TapiCallRedirect Method
Redirects the call to the specified destination number.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void Redirect(
    string number
)
Public Sub Redirect (
    number As String
)
public:
void Redirect(
    String^ number
)

Parameters

number
Type: SystemString
Number where the call is to be redirected to. The number uses the standard dialable number format.
Exceptions
Exception | Condition
TapiException | The call was not redirected because a TAPI error occurred.
Remarks

The telephony hardware must support "redirect" function in order for Redirect method to work. Voice modems do not support this function.

Please note that some telephony hardware requires a call to be in the accepted state before redirecting the call. Use Accept to accept incoming call, then use Redirect in the CallState event handler to redirect the call after call state changes to TapiCallState.Accepted.

See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiCallTransfer(String)


TapiCall.RemoveFromConference Method

TapiCallRemoveFromConference Method
Removes the call from the conference.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void RemoveFromConference()
Public Sub RemoveFromConference
public:
void RemoveFromConference()
Exceptions
Exception | Condition
TapiException | The call was not removed from the conference because a TAPI error occurred.
Remarks

Use RemoveFromConference method to remove the call from the conference call to which it currently belongs. The remaining calls in the conference call are unaffected. The availability of this operation and its result are likely to be limited in many PBXs. For example, in many cases, only the most recently added party can be removed from a conference, and the removed call can be automatically dropped.

See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiCallAddToConference(TapiCall)


TapiCall.SetupTransfer Method

TapiCallSetupTransfer Method
Initiates a transfer of the call. It establishes a consultation call, on which the destination of the transfer can be dialed.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCall SetupTransfer()
Public Function SetupTransfer As TapiCall
public:
TapiCall^ SetupTransfer()

Return Value

Type: TapiCall
Temporary consultation call. When setting up a call for transfer, a consultation call is automatically created that enables Dial(String) to dial the number of the new transfer destination of the call. The originating party can carry on a conversation over this consultation call prior to completing the transfer.
Exceptions
Exception | Condition
TapiException | Setup transfer failed because a TAPI error occurred.
Remarks

The setup phase of a transfer establishes a consultation call that enables the application to send the number of the destination (the party to be transferred to) to the switch, while the call to be transferred is kept on hold. This new call is referred to as a consultation call and can be disconnected or otherwise manipulated independently of the original call.

When the consultation call has reached the DialTone state, the application can proceed transferring the call either by dialing the destination number using Dial(String) and tracking the call progress, or by unholding an existing call. The transfer of the original call to the selected destination is completed using CompleteTransfer(TapiCall, Boolean).

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(TapiCall). A consultation call can be canceled using Disconnect on it. 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 can be used to recover the call. In this case, the consultation call is destroyed.

The application can also transfer calls in a single step, without having to deal with the intervening consultation call, by using Transfer(String).

Examples
The following code shows how to perform a 2-step or consultation call transfer. Error handling has been omitted for clarity.
C#
VB
C++
Copy
// Assuming activeCall represents an active call in Connected state
// The remote party on that call will be transferred to extension 201

// First step: create consultation call and dial ext. 201
TapiCall consultationCall = activeCall.SetupTransfer();
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 transferring the remote party to ext. 201
...
// Second step: complete the transfer
activeCall.CompleteTransfer(consultationCall, false);
// Now the remote party of the active call can talk to ext. 201
// The user's line is free to accept new calls
' Assuming activeCall represents an active call in Connected state
' The remote party on that call will be transferred to extension 201

' First step: create consultation call and dial ext. 201
Dim consultationCall as TapiCall
consultationCall = activeCall.SetupTransfer()
System.Threading.Thread.Sleep(500)
If consultationCall.State = TapiCallState.DialTone Then
  consultationCall.Dial("201")
Else
  ' Error, consultation call is not in dialtone state
EndIf
' When the state of the consultation call changes to Connected, the user can talk to ext. 201
' before transferring the remote party to ext. 201
...
' Second step: complete the transfer
activeCall.CompleteTransfer(consultationCall, False)
' Now the remote party of the active call can talk to ext. 201
' The user's line is free to accept new calls

No code example is currently available or this language may not be supported.

See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiCallDial(String)
TapiCallCompleteTransfer(TapiCall, Boolean)


TapiCall.Speak Method

TapiCallSpeak Method
Overload List
 | Name | Description
Public method | Speak(String) | Speaks the contents of a text string using text synthesis. Pending speak and play requests are not purged.
Public method | Speak(String, Boolean) | Speaks the contents of a text string using text synthesis.
Top
See Also

Reference

TapiCall Class


TapiCall.Speak Method (String)

TapiCallSpeak Method (String)
Speaks the contents of a text string using text synthesis. Pending speak and play requests are not purged.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void Speak(
    string text
)
Public Sub Speak (
    text As String
)
public:
void Speak(
    String^ text
)

Parameters

text
Type: SystemString
Text string (possibly containing XML markup) to be synthesized.
Exceptions
Exception | Condition
TapiDisconnectException | The call has been already disconnected.
Remarks

Speak method speaks a text using text-to-speech voice selected in SpeechVoice property. SpeechVolume property sets the volume of the spoken text. SpeechRate sets the rate (speed) of the spoken text.

Speak is asynchronous and returns immediately after the speak request is queued. AddTapi.NET will speak and play queued Speak and Play(String, Boolean) requests in the same order they were queued. The text passed to this Speak call will be spoken after all outstaning speak and play requests are completed. Use WaitUntilDone(Int32) method to find out if all speak and play requests are completed or to wait until all requests are completed. If you want to purge all outstanding requests and start to speak the text immediately, use Speak(String, Boolean) and set purgeBeforeSpeak parameter to true.

If the first character of the string in text parameter is a left-angle-bracket (<), the input text will be parsed for XML markup. The application can use any SAPI 5 XML tags supported by the text-to-speech engine you are using. Please refer to the Synthesis Markup http://msdn.microsoft.com/en-us/library/ms723638.aspx and XML TTS Tutorial http://msdn.microsoft.com/en-us/library/ms717077.aspx topics in Microsoft Speech API documentation for detailed description of SAPI 5 XML.

See Also

Reference

TapiCall Class
Speak Overload
Traysoft.AddTapi Namespace
TapiCallSpeak(String, Boolean)
TapiCallPlay(String, Boolean)
TapiCallWaitUntilDone(Int32)


TapiCall.Speak Method (String, Boolean)

TapiCallSpeak Method (String, Boolean)
Speaks the contents of a text string using text synthesis.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void Speak(
    string text,
    bool purgeBeforeSpeak
)
Public Sub Speak (
    text As String,
    purgeBeforeSpeak As Boolean
)
public:
void Speak(
    String^ text,
    bool purgeBeforeSpeak
)

Parameters

text
Type: SystemString
Text string (possibly containing XML markup) to be synthesized.
purgeBeforeSpeak
Type: SystemBoolean
Indicates whether to purge all pending speak and play requests prior to this speak call.
Exceptions
Exception | Condition
TapiDisconnectException | The call has been already disconnected.
Remarks

Speak method speaks a text using text-to-speech voice selected in SpeechVoice property. SpeechVolume property sets the volume of the spoken text. SpeechRate sets the rate (speed) of the spoken text.

Speak is asynchronous and returns immediately after the speak request is queued. AddTapi.NET will speak and play queued Speak and Play(String, Boolean) requests in the same order they were queued. Use WaitUntilDone(Int32) method to find out if all speak and play requests are completed or to wait until all requests are completed. If purgeBeforeSpeak parameter is true, Speak clears the queue and removes all pending speak and play requests prior to this speak call. In effect, Speak call with purgeBeforeSpeak set to true stops the currently playing file or text and starts speaking the new text passed in text parameter.

If the first character of the string in text parameter is a left-angle-bracket (<), the input text will be parsed for XML markup. The application can use any SAPI 5 XML tags supported by the text-to-speech engine you are using. Please refer to the Synthesis Markup http://msdn.microsoft.com/en-us/library/ms723638.aspx and XML TTS Tutorial http://msdn.microsoft.com/en-us/library/ms717077.aspx topics in Microsoft Speech API documentation for detailed description of SAPI 5 XML.

See Also

Reference

TapiCall Class
Speak Overload
Traysoft.AddTapi Namespace
TapiCallPlay(String, Boolean)
TapiCallWaitUntilDone(Int32)


TapiCall.StartRecording Method

TapiCallStartRecording Method
Starts recording of call audio.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void StartRecording(
    string file
)
Public Sub StartRecording (
    file As String
)
public:
void StartRecording(
    String^ file
)

Parameters

file
Type: SystemString
Filename (including path) of the file to be recorded.
Remarks

This method starts recording of the call audio stream to the specified wave file. StartRecording method instructs AddTapi.NET to start recording and returns immediately. The application can use other methods such as WaitForDigit(Int32) while recording is in progress. Use StopRecording to stop recording and close the wave file. Wave file specified in the file parameter is not accessible until recording is stopped.

Please note that some telephony hardware including most voice modems does not support simultaneous playback and recording. Use StopPlayback to stop playback before calling StartRecording with such hardware.

See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiCallStopRecording
TapiCallStopPlayback


TapiCall.StopPlayback Method

TapiCallStopPlayback Method
Stops currently playing wave file or text-to-speech.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void StopPlayback()
Public Sub StopPlayback
public:
void StopPlayback()
Remarks

StopPlayback stops playback of wave file or text-to-speech and purges all pending speak and play requests. Use this method to stop audio output before calling StartRecording(String) if the telephony hardware does not support simultaneous playback and recording.

See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiCallPlay(String, Boolean)
TapiCallSpeak(String, Boolean)
TapiCallStartRecording(String)


TapiCall.StopRecording Method

TapiCallStopRecording Method
Stops recording of call audio.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void StopRecording()
Public Sub StopRecording
public:
void StopRecording()
Remarks

This method stops recording that was started using StartRecording(String) and closes the wave file. Wave file specified in the file parameter of the StartRecording(String) method is not accessible until recording is stopped.

See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiCallStartRecording(String)


TapiCall.SwapHold Method

TapiCallSwapHold Method
Swaps the active call with the specified call on consultation hold.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void SwapHold(
    TapiCall heldCall
)
Public Sub SwapHold (
    heldCall As TapiCall
)
public:
void SwapHold(
    TapiCall^ heldCall
)

Parameters

heldCall
Type: Traysoft.AddTapiTapiCall
object representing the call on consultation hold. The call state of the heldCall can be OnHoldPendingTransfer, OnHoldPendingConference, or OnHold.
Exceptions
Exception | Condition
TapiException | The swap hold failed because a TAPI error occurred.
Remarks

Swapping the active call with the call on consultation hold allows the application to alternate or toggle between these two calls.

See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
Traysoft.AddTapiTapiCall
TapiCallSetupTransfer
TapiCallHold


TapiCall.Transfer Method

TapiCallTransfer Method
Performs a blind or single-step transfer of the call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void Transfer(
    string number
)
Public Sub Transfer (
    number As String
)
public:
void Transfer(
    String^ number
)

Parameters

number
Type: SystemString
Number where the call is to be transferred to. The number uses the standard dialable number format.
Exceptions
Exception | Condition
TapiException | The call was not transfered because a TAPI error occurred.
Remarks

The telephony hardware must support "blind transer" or "one-step transfer" function in order for Transfer method to work. Please note that voice modems do not support this function. The application can use GenerateDigits(String) method to generate a sequence of DTMF digits that will instruct the switch to perform a transfer.

Please note that some telephony hardware requires a call to be in the connected state before transferring the call. You can instruct AddTapi.NET to automatically answer incoming calls by setting RingsToAnswer to 1 and perfom a transfer using Transfer in your TapiCallHandler method.

See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiCallRedirect(String)


TapiCall.Unhold Method

TapiCallUnhold Method
Retrieves the held call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void Unhold()
Public Sub Unhold
public:
void Unhold()
Exceptions
Exception | Condition
TapiException | The held call was not retrieved because a TAPI error occurred.
Remarks

Use Unhold method to retrieve a call that was previously put on hold using Hold. When telephony hardware completes unhold operation, retrieved call transitions back to the TapiCallState.Connected state and CallState event is fired. If the held party hangs up while on hold, the call transitions to the TapiCallState.Disconnected state.

See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiCallHold


TapiCall.WaitForDigit Method

TapiCallWaitForDigit Method
Waits until either a DTMF digit has been detected or the specified time interval has elapsed.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string WaitForDigit(
    int timeoutSeconds
)
Public Function WaitForDigit (
    timeoutSeconds As Integer
) As String
public:
String^ WaitForDigit(
    int timeoutSeconds
)

Parameters

timeoutSeconds
Type: SystemInt32
Timeout period in seconds. Negative value means that the timeout should start after playback initiated by the Play(String) or Speak(String) is completed.

Return Value

Type: String
A string that contains detected digit, if any. This method returns a null reference (Nothing in Visual Basic) if no digits were detected within the specified time interval.
Exceptions
Exception | Condition
TapiDisconnectException | The call has been disconnected while waiting for a digit.
Remarks
This method detects DTMF digits (buttons) pressed by the remote party on a touch-tone phone. When zero timeout is specified, WaitForDigit returns a digit received since the last call to WaitForDigit or GatherDigits(Int32, String, Int32, Int32) or since the beginning of the call, if any. With non-zero timeout WaitForDigit ignores the digits received before the application called this method.
See Also

Reference

TapiCall Class
Traysoft.AddTapi Namespace
TapiCallGatherDigits(Int32, String, Int32, Int32)


TapiCall.WaitForSilence Method

TapiCallWaitForSilence Method
Waits until either a period of silence has been detected or the specified time interval has elapsed.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public bool WaitForSilence(
    int silenceDurationMilliseconds,
    int timeoutSeconds
)
Public Function WaitForSilence (
    silenceDurationMilliseconds As Integer,
    timeoutSeconds As Integer
) As Boolean
public:
bool WaitForSilence(
    int silenceDurationMilliseconds,
    int timeoutSeconds
)

Parameters

silenceDurationMilliseconds
Type: SystemInt32
Duration of time during which the silence should be present before a detection is made, in milliseconds.
timeoutSeconds
Type: SystemInt32
Timeout period in seconds.

Return Value

Type: Boolean
This method returns true if the silence was detected or false if the silence was not detected within the specified time interval.
Exceptions
Exception | Condition
TapiDisconnectException | The call has been disconnected while waiting for silence.
Remarks

WaitForSilence detects a specified period of silence on the call. This method can be useful if the application makes outgoing calls and needs to wait until the end of answering machine greetings before playing a message.

Please note that the telephony hardware must support hardware silence detection for this method to work. Regular voice modems do not support silence detection.

See Also

Reference

TapiCall Class


TapiCall.WaitUntilDone Method

TapiCallWaitUntilDone Method
Waits until either all pending speak and play requests have completed or the specified time interval has elapsed.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public bool WaitUntilDone(
    int timeoutSeconds
)
Public Function WaitUntilDone (
    timeoutSeconds As Integer
) As Boolean
public:
bool WaitUntilDone(
    int timeoutSeconds
)

Parameters

timeoutSeconds
Type: SystemInt32
Timeout period in seconds.

Return Value

Type: Boolean
True if all pending speak and play requests completed withing the specified time interval.
Exceptions
Exception | Condition
TapiDisconnectException | The call has been disconnected while waiting for speak and play requests to be completed.
Remarks
When the application calls Speak(String, Boolean) or Play(String, Boolean), speak and play requests are added to the queue. AddTapi.NET plays and speaks queued play and speak requests in the same order they were queued. The application can use WaitUntilDone method to wait until all pending speak and play requests have completed.
See Also

Reference

TapiCall Class


TapiCallDirection Enumeration

TapiCallDirection Enumeration
Describes the direction of a call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public enum TapiCallDirection
Public Enumeration TapiCallDirection
public enum class TapiCallDirection
Members
Member name | Value | Description
Unknown | 0 | The direction is currently unknown.
Incoming | 1 | Indicates incoming call.
Outgoing | 2 | Indicates outgoing call.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiCallFeatures Enumeration

TapiCallFeatures Enumeration
Indicate operations that can be invoked for a given address or call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
[FlagsAttribute]
public enum TapiCallFeatures
<FlagsAttribute>
Public Enumeration TapiCallFeatures
[FlagsAttribute]
public enum class TapiCallFeatures
Members
Member name | Value | Description
Accept | 1 | Accept the call (Accept).
Answer | 4 | Answer the call (Answer).
BlindTransfer | 8 | Perform a blind (one-step) transfer on the call (Transfer(String)).
CompleteTransfer | 32 | Complete the call transfer (CompleteTransfer(TapiCall, Boolean)).
Dial | 64 | Dial the destination number for the call (Dial(String)).
Drop | 128 | Drop (disconnect) the call (Disconnect).
GatherDigits | 256 | Gather digits from the call (GatherDigits(Int32, String, Int32, Int32)).
GenerateDigits | 512 | Generate digits on the call (GenerateDigits(String)).
Hold | 2048 | Put the call on hold (Hold).
MonitorDigits | 4096 | Monitor digits on the call (WaitForDigit(Int32) and DigitDetected).
MonitorTones | 16384 | Monitor silence and tones on the call (WaitForSilence(Int32, Int32)).
Park | 32768 | Park the call (Park(String)).
PrepareAddToConference | 65536 | Prepare the call for addition to a conference (PrepareAddToConference).
Redirect | 131072 | Redirect the call to another destination (Redirect(String)).
RemoveFromConference | 262144 | Remove the call from the conference (RemoveFromConference).
SetupConference | 16777216 | Set up a conference (SetupConference(TapiCall, TapiCall, Int32)).
SetupTransfer | 33554432 | Set up a transfer (SetupTransfer).
SwapHold | 67108864 | Perform a swap hold operation (SwapHold(TapiCall)).
UnHold | 134217728 | Take the call off hold (Unhold).
All | 252173293 | A mask that includes all call features.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiCallHandler Delegate

TapiCallHandler Delegate
Represents a method that will perform call flow processing.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public delegate void TapiCallHandler(
    TapiCall call
)
Public Delegate Sub TapiCallHandler (
    call As TapiCall
)
public delegate void TapiCallHandler(
    TapiCall^ call
)

Parameters

call
Type: Traysoft.AddTapiTapiCall
A call to be processed.
Remarks
When a call is connected, AddTapi.NET calls a method that will perform application-specific call flow processing. For an example of such methods please refer to the samples included in AddTapi.NET installation. Please note that your method must call Disconnect to release the call before the method exits if the call is no longer needed and should be disconnected. The method represented by this delegate is called on a separate thread and executed in the background. Several copies of this method can be executed at the same time (one for each line). If you call other methods of your class or access other classes, make sure you do that in a thread-safe manner. Windows Forms controls cannot be accessed directly in this method because it is called on a non-UI thread. The application must use Invoke mechanism to access Windows Forms controls from this method. Please refer to the included samples for an example of using Invoke to update Windows Forms controls.
Examples
The following code shows how to define a method for call flow processing. Error handling has been omitted for clarity.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiLine line = TapiApp.Lines[0];
line.Open(true, CallHandler);
line.RingsToAnswer = 1;
...

// This method will be called when incoming call is answered
private void CallHandler(TapiCall call)
{
    call.Play("welcome.wav");
    call.Speak("Press 1 to hear the current time. Press any other button to disconnect.");
    if(call.WaitForDigit(20) == "1")
    {
        call.Speak(DateTime.Now.ToString());
        call.WaitUntilDone(10);
    }
    call.Disconnect();
}
TapiApp.Initialize("MyApp")
Dim objLine As TapiLine
objLine = TapiApp.Lines(0)
objLine.Open(True, AddressOf CallHandler)
objLine.RingsToAnswer = 1;
...

' This method will be called when incoming call is answered
Private Sub CallHandler(ByVal objCall As TapiCall)
    objCall.Play("welcome.wav")
    objCall.Speak("Press 1 to hear the current time. Press any other button to disconnect.")
    If objCall.WaitForDigit(20) = "1" Then
        objCall.Speak(DateTime.Now.ToString())
        objCall.WaitUntilDone(10)
    End If
    objCall.Disconnect()
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

Traysoft.AddTapi Namespace
TapiLineOpen(Boolean, TapiCallHandler)


TapiCallInfoEventArgs Class

TapiCallInfoEventArgs Class
Provides data for the CallInfo event.
Inheritance Hierarchy
SystemObject
SystemEventArgs
Traysoft.AddTapiTapiEventArgs
Traysoft.AddTapiTapiCallInfoEventArgs

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public class TapiCallInfoEventArgs : TapiEventArgs
Public Class TapiCallInfoEventArgs
    Inherits TapiEventArgs
public ref class TapiCallInfoEventArgs : public TapiEventArgs

The TapiCallInfoEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | CallInfoState | Gets the call information item(s) that has changed. Can be one or more of the TapiCallInfoState flags.
Top
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiCallInfoEventArgs Properties

TapiCallInfoEventArgs Properties

The TapiCallInfoEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | CallInfoState | Gets the call information item(s) that has changed. Can be one or more of the TapiCallInfoState flags.
Top
See Also

Reference

TapiCallInfoEventArgs Class


TapiCallInfoEventArgs.CallInfoState Property

TapiCallInfoEventArgsCallInfoState Property
Gets the call information item(s) that has changed. Can be one or more of the TapiCallInfoState flags.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCallInfoState CallInfoState { get; }
Public ReadOnly Property CallInfoState As TapiCallInfoState
    Get
public:
property TapiCallInfoState CallInfoState {
    TapiCallInfoState get ();
}

Property Value

Type: TapiCallInfoState
See Also

Reference

TapiCallInfoEventArgs Class


TapiCallInfoEventHandler Delegate

TapiCallInfoEventHandler Delegate
Represents the method that will handle CallInfo event.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public delegate void TapiCallInfoEventHandler(
    Object sender,
    TapiCallInfoEventArgs args
)
Public Delegate Sub TapiCallInfoEventHandler (
    sender As Object,
    args As TapiCallInfoEventArgs
)
public delegate void TapiCallInfoEventHandler(
    Object^ sender,
    TapiCallInfoEventArgs^ args
)

Parameters

sender
Type: SystemObject
The source of the event (currently not used by AddTapi.NET).
args
Type: Traysoft.AddTapiTapiCallInfoEventArgs
An TapiCallInfoEventArgs that contains event data.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiCallInfoState Enumeration

TapiCallInfoState Enumeration
Describes various call information items in the CallInfo event.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
[FlagsAttribute]
public enum TapiCallInfoState
<FlagsAttribute>
Public Enumeration TapiCallInfoState
[FlagsAttribute]
public enum class TapiCallInfoState
Members
Member name | Value | Description
CallID | 64 | The CallID of the call has changed or became available.
RelatedCallID | 128 | The RelatedCallID of the call has changed or became available.
Origin | 256 | The Origin of the call has changed or became available.
Reason | 512 | The Reason for the call has changed or became available.
Trunk | 16384 | The Trunk of the call has changed or became available.
CallerID | 32768 | The CallerID or CallerIDName of the call has changed or became available.
CalledID | 65536 | The CalledID or CalledIDName of the call has changed or became available.
ConnectedID | 131072 | The ConnectedID or ConnectedIDName of the call has changed or became available.
RedirectionID | 262144 | The RedirectionID or RedirectionIDName of the call has changed or became available.
RedirectingID | 524288 | The RedirectingID or RedirectingIDName of the call has changed or became available.
Display | 1048576 | The Display of the call has changed or became available.
CallData | 1073741824 | The CallData of the call has changed or became available.
All | 1075823552 | A mask that includes all call info states.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiCallOrigin Enumeration

TapiCallOrigin Enumeration
Describes the origin of a call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
[FlagsAttribute]
public enum TapiCallOrigin
<FlagsAttribute>
Public Enumeration TapiCallOrigin
[FlagsAttribute]
public enum class TapiCallOrigin
Members
Member name | Value | Description
Outbound | 1 | The call originated from this station as an outgoing call.
Internal | 2 | The call originated as an incoming call at a station internal to the same switching environment. For example, a call from one extension to another on the same PBX.
External | 4 | The call originated as an incoming call on an external line.
Unknown | 16 | The call origin is currently unknown but may become known later.
Unavail | 32 | The call origin is not available and will never become known for this call.
Conference | 64 | The call is a conference call, that is, it is the application's connection to the conference bridge in the switch.
Inbound | 128 | The call originated as an incoming call, but the service provider is unable to determine whether it came from another station on the same switch or from an external line.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiCallPrivilege Enumeration

TapiCallPrivilege Enumeration
The TapiCallPrivilege bit-flag constants describe the kinds of access rights or privileges an application may have to the corresponding call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
[FlagsAttribute]
public enum TapiCallPrivilege
<FlagsAttribute>
Public Enumeration TapiCallPrivilege
[FlagsAttribute]
public enum class TapiCallPrivilege
Members
Member name | Value | Description
Unknown | 0 | The privilege is unknown but can become known later.
None | 1 | The application has no privileges to the call. The application should not use the call object.
Monitor | 2 | The application has monitor privileges to the call. These privileges allow the application to monitor state changes and query information and status about the call.
Owner | 4 | The application has owner privileges to the call. These privileges allow the application to manipulate the call in ways that affect the state of the call.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiCallReason Enumeration

TapiCallReason Enumeration
Describes the reason for a call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
[FlagsAttribute]
public enum TapiCallReason
<FlagsAttribute>
Public Enumeration TapiCallReason
[FlagsAttribute]
public enum class TapiCallReason
Members
Member name | Value | Description
Direct | 1 | This is a direct incoming or outgoing call.
FwdBusy | 2 | This call was forwarded from another extension that was busy at the time of the call.
FwdNoAnswer | 4 | The call was forwarded from another extension that didn't answer the call after some number of rings.
FwdUncond | 8 | The call was forwarded unconditionally from another number.
Pickup | 16 | The call was picked up from another extension.
Unpark | 32 | The call was retrieved as a parked call.
Redirect | 64 | The call was redirected to this station.
CallCompletion | 128 | The call was the result of a call completion request.
Transfer | 256 | The call has been transferred from another number.
Reminder | 512 | The call is a reminder (or "recall") that the user has a call parked or on hold for (potentially) a long time.
Unknown | 1024 | The reason for the call is currently unknown but may become known later.
Unavail | 2048 | The reason for the call is unavailable and will not become known later.
Intrude | 4096 | The call intruded onto the line, either by a call completion action invoked by another station or by operator action. Depending on switch implementation, the call may appear either in the connected state, or conferenced with an existing active call on the line.
Parked | 8192 | The call was parked on the address. Usually, it appears initially in the onhold state.
CampedOn | 16384 | The call was camped on the address. Usually, it appears initially in the onhold state. If an active call becomes idle, the camped-on call may change to the offering state and the device start ringing.
RouteRequest | 32768 | The call appears on the address because the switch needs routing instructions from the application.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiCallState Enumeration

TapiCallState Enumeration
Describes the state of a call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public enum TapiCallState
Public Enumeration TapiCallState
public enum class TapiCallState
Members
Member name | Value | Description
Unknown | 0 | The call exists, but its state is currently unknown.
Offering | 1 | The call is being offered to the station, signaling the arrival of a new call.
Dialing | 2 | The originator is dialing digits on the call.
Connected | 3 | The call has been established and the connection is made.
Disconnected | 4 | The call has been disconnected.
Idle | 5 | The call has been disconnected and is no longer active. This is the final state of the call before it's destroyed. A call can never transition out of the idle state.
Accepted | 6 | The call was in the offering state and has been accepted by the called party.
DialTone | 7 | The call is receiving a dial tone from the switch, which means that the switch is ready to receive a dialed number.
Proceeding | 8 | Dialing has completed and the call is proceeding through the switch or telephone network. This occurs after dialing is complete and before the call reaches the dialed party, as indicated by ringback, busy, or answer.
Ringback | 9 | The station to be called has been reached, and the destination's switch is generating a ring tone back to the originator. A ringback means that the destination address is being alerted to the call.
OnHold | 10 | The call is on hold by the switch. This frees the physical line, which allows another call to use the line.
OnHoldPendingConference | 11 | The call is currently on hold while it is being added to a conference.
OnHoldPendingTransfer | 12 | The call is currently on hold awaiting transfer to another number.
Conferenced | 13 | The call is a member of a conference call and is logically in the connected state.
SpecialInfo | 14 | The call is receiving a special information signal, which precedes a prerecorded announcement indicating why a call cannot be completed. AddTapi.NET will disconnected the call shortly and set the DisconnectMode property based on the special signal received.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiConnectedMode Enumeration

TapiConnectedMode Enumeration
Describes different substates of a connected call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public enum TapiConnectedMode
Public Enumeration TapiConnectedMode
public enum class TapiConnectedMode
Members
Member name | Value | Description
Unknown | 0 | The mode is unknown but may become known later.
Active | 1 | Indicates that the call is connected at the current station (the current station is a participant in the call).
Inactive | 2 | Indicates that the call is active at one or more other stations, but the current station is not a participant in the call.
ActiveHeld | 4 | Indicates that the station is an active participant in the call, but that the remote party has placed the call on hold.
InactiveHeld | 8 | Indicates that the station is not an active participant in the call, and that the remote party has placed the call on hold.
Confirmed | 16 | Indicates that the TSP received affirmative notification that the call has entered the connected state (for example, through answer supervision or similar mechanisms).
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiDeviceSpecificEventArgs Class

TapiDeviceSpecificEventArgs Class
Provides data for the DeviceSpecific and DeviceSpecificFeature events.
Inheritance Hierarchy
SystemObject
SystemEventArgs
Traysoft.AddTapiTapiEventArgs
Traysoft.AddTapiTapiDeviceSpecificEventArgs

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public class TapiDeviceSpecificEventArgs : TapiEventArgs
Public Class TapiDeviceSpecificEventArgs
    Inherits TapiEventArgs
public ref class TapiDeviceSpecificEventArgs : public TapiEventArgs

The TapiDeviceSpecificEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Param1 | Gets device specific message parameter.
Public property | Param2 | Gets device specific message parameter.
Public property | Param3 | Gets device specific message parameter.
Top
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiDeviceSpecificEventArgs Properties

TapiDeviceSpecificEventArgs Properties

The TapiDeviceSpecificEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Param1 | Gets device specific message parameter.
Public property | Param2 | Gets device specific message parameter.
Public property | Param3 | Gets device specific message parameter.
Top
See Also

Reference

TapiDeviceSpecificEventArgs Class


TapiDeviceSpecificEventArgs.Param1 Property

TapiDeviceSpecificEventArgsParam1 Property
Gets device specific message parameter.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public uint Param1 { get; }
Public ReadOnly Property Param1 As UInteger
    Get
public:
property unsigned int Param1 {
    unsigned int get ();
}

Property Value

Type: UInt32
See Also

Reference

TapiDeviceSpecificEventArgs Class


TapiDeviceSpecificEventArgs.Param2 Property

TapiDeviceSpecificEventArgsParam2 Property
Gets device specific message parameter.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public uint Param2 { get; }
Public ReadOnly Property Param2 As UInteger
    Get
public:
property unsigned int Param2 {
    unsigned int get ();
}

Property Value

Type: UInt32
See Also

Reference

TapiDeviceSpecificEventArgs Class


TapiDeviceSpecificEventArgs.Param3 Property

TapiDeviceSpecificEventArgsParam3 Property
Gets device specific message parameter.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public uint Param3 { get; }
Public ReadOnly Property Param3 As UInteger
    Get
public:
property unsigned int Param3 {
    unsigned int get ();
}

Property Value

Type: UInt32
See Also

Reference

TapiDeviceSpecificEventArgs Class


TapiDeviceSpecificEventHandler Delegate

TapiDeviceSpecificEventHandler Delegate
Represents the method that will handle DeviceSpecific and DeviceSpecificFeature events.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public delegate void TapiDeviceSpecificEventHandler(
    Object sender,
    TapiDeviceSpecificEventArgs args
)
Public Delegate Sub TapiDeviceSpecificEventHandler (
    sender As Object,
    args As TapiDeviceSpecificEventArgs
)
public delegate void TapiDeviceSpecificEventHandler(
    Object^ sender,
    TapiDeviceSpecificEventArgs^ args
)

Parameters

sender
Type: SystemObject
The source of the event (currently not used by AddTapi.NET).
args
Type: Traysoft.AddTapiTapiDeviceSpecificEventArgs
An TapiDeviceSpecificEventArgs that contains event data.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiDeviceSpecificExtensionID Class

TapiDeviceSpecificExtensionID Class
Describes an extension identifier used to identify device specific extensions for line devices.
Inheritance Hierarchy
SystemObject
Traysoft.AddTapiTapiDeviceSpecificExtensionID

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public class TapiDeviceSpecificExtensionID
Public Class TapiDeviceSpecificExtensionID
public ref class TapiDeviceSpecificExtensionID

The TapiDeviceSpecificExtensionID type exposes the following members.

Properties
 | Name | Description
Public property | ID0 | First part of the extension identifier.
Public property | ID1 | Second part of the extension identifier.
Public property | ID2 | Third part of the extension identifier.
Public property | ID3 | Fourth part of the extension identifier.
Top
See Also

Reference

Traysoft.AddTapi Namespace
TapiLineDeviceSpecificExtensionID


TapiDeviceSpecificExtensionID Properties

TapiDeviceSpecificExtensionID Properties

The TapiDeviceSpecificExtensionID type exposes the following members.

Properties
 | Name | Description
Public property | ID0 | First part of the extension identifier.
Public property | ID1 | Second part of the extension identifier.
Public property | ID2 | Third part of the extension identifier.
Public property | ID3 | Fourth part of the extension identifier.
Top
See Also

Reference

TapiDeviceSpecificExtensionID Class


TapiDeviceSpecificExtensionID.ID0 Property

TapiDeviceSpecificExtensionIDID0 Property
First part of the extension identifier.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public uint ID0 { get; }
Public ReadOnly Property ID0 As UInteger
    Get
public:
property unsigned int ID0 {
    unsigned int get ();
}

Property Value

Type: UInt32
See Also

Reference

TapiDeviceSpecificExtensionID Class


TapiDeviceSpecificExtensionID.ID1 Property

TapiDeviceSpecificExtensionIDID1 Property
Second part of the extension identifier.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public uint ID1 { get; }
Public ReadOnly Property ID1 As UInteger
    Get
public:
property unsigned int ID1 {
    unsigned int get ();
}

Property Value

Type: UInt32
See Also

Reference

TapiDeviceSpecificExtensionID Class


TapiDeviceSpecificExtensionID.ID2 Property

TapiDeviceSpecificExtensionIDID2 Property
Third part of the extension identifier.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public uint ID2 { get; }
Public ReadOnly Property ID2 As UInteger
    Get
public:
property unsigned int ID2 {
    unsigned int get ();
}

Property Value

Type: UInt32
See Also

Reference

TapiDeviceSpecificExtensionID Class


TapiDeviceSpecificExtensionID.ID3 Property

TapiDeviceSpecificExtensionIDID3 Property
Fourth part of the extension identifier.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public uint ID3 { get; }
Public ReadOnly Property ID3 As UInteger
    Get
public:
property unsigned int ID3 {
    unsigned int get ();
}

Property Value

Type: UInt32
See Also

Reference

TapiDeviceSpecificExtensionID Class


TapiDigitDetectedEventArgs Class

TapiDigitDetectedEventArgs Class
Provides data for the DigitDetected event.
Inheritance Hierarchy
SystemObject
SystemEventArgs
Traysoft.AddTapiTapiEventArgs
Traysoft.AddTapiTapiDigitDetectedEventArgs

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public class TapiDigitDetectedEventArgs : TapiEventArgs
Public Class TapiDigitDetectedEventArgs
    Inherits TapiEventArgs
public ref class TapiDigitDetectedEventArgs : public TapiEventArgs

The TapiDigitDetectedEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Digit | Gets the detected digit.
Top
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiDigitDetectedEventArgs Properties

TapiDigitDetectedEventArgs Properties

The TapiDigitDetectedEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Digit | Gets the detected digit.
Top
See Also

Reference

TapiDigitDetectedEventArgs Class


TapiDigitDetectedEventArgs.Digit Property

TapiDigitDetectedEventArgsDigit Property
Gets the detected digit.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public char Digit { get; }
Public ReadOnly Property Digit As Char
    Get
public:
property wchar_t Digit {
    wchar_t get ();
}

Property Value

Type: Char
See Also

Reference

TapiDigitDetectedEventArgs Class


TapiDigitDetectedEventHandler Delegate

TapiDigitDetectedEventHandler Delegate
Represents the method that will handle DigitDetected event.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public delegate void TapiDigitDetectedEventHandler(
    Object sender,
    TapiDigitDetectedEventArgs args
)
Public Delegate Sub TapiDigitDetectedEventHandler (
    sender As Object,
    args As TapiDigitDetectedEventArgs
)
public delegate void TapiDigitDetectedEventHandler(
    Object^ sender,
    TapiDigitDetectedEventArgs^ args
)

Parameters

sender
Type: SystemObject
The source of the event (currently not used by AddTapi.NET).
args
Type: Traysoft.AddTapiTapiDigitDetectedEventArgs
An TapiDigitDetectedEventArgs that contains event data.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiDisconnectException Class

TapiDisconnectException Class
The exception that is thrown when the call is disconnected before application called Disconnect method.
Inheritance Hierarchy
SystemObject
SystemException
Traysoft.AddTapiTapiException
Traysoft.AddTapiTapiDisconnectException

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public class TapiDisconnectException : TapiException
Public Class TapiDisconnectException
    Inherits TapiException
public ref class TapiDisconnectException : public TapiException
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiDisconnectMode Enumeration

TapiDisconnectMode Enumeration
Describes different reasons for a disconnect of a call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public enum TapiDisconnectMode
Public Enumeration TapiDisconnectMode
public enum class TapiDisconnectMode
Members
Member name | Value | Description
Unknown | 0 | The reason for the disconnect is unknown but may become known later.
Normal | 1 | The call was terminated normally either locally or by a remote party.
Busy | 2 | The called number is busy.
NoAnswer | 3 | The called party did not answer within the specified timeout.
NoDialTone | 4 | A dial tone was not detected.
Error | 5 | The call was terminated because of an error.
OutOfOrder | 6 | The call could not be connected or was disconnected because the destination device is out of order. This could occur if for example there was a hardware failure.
Forwarded | 7 | The call was forwarded by the switch.
Pickup | 8 | The call was picked up from elsewhere.
Cancelled | 9 | The call was cancelled.
BadAddress | 10 | The destination address (phone number or extension) is invalid.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiErrorEventArgs Class

TapiErrorEventArgs Class
Provides data for the TapiError event.
Inheritance Hierarchy
SystemObject
SystemEventArgs
Traysoft.AddTapiTapiEventArgs
Traysoft.AddTapiTapiErrorEventArgs

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public class TapiErrorEventArgs : TapiEventArgs
Public Class TapiErrorEventArgs
    Inherits TapiEventArgs
public ref class TapiErrorEventArgs : public TapiEventArgs

The TapiErrorEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Message | Gets a message that describes the error.
Public property | TapiError | Gets the TAPI error number. Common TAPI error numbers are listed in TapiErrors enumeration.
Top
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiErrorEventArgs Properties

TapiErrorEventArgs Properties

The TapiErrorEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Message | Gets a message that describes the error.
Public property | TapiError | Gets the TAPI error number. Common TAPI error numbers are listed in TapiErrors enumeration.
Top
See Also

Reference

TapiErrorEventArgs Class


TapiErrorEventArgs.Message Property

TapiErrorEventArgsMessage Property
Gets a message that describes the error.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string Message { get; }
Public ReadOnly Property Message As String
    Get
public:
property String^ Message {
    String^ get ();
}

Property Value

Type: String
See Also

Reference

TapiErrorEventArgs Class


TapiErrorEventArgs.TapiError Property

TapiErrorEventArgsTapiError Property
Gets the TAPI error number. Common TAPI error numbers are listed in TapiErrors enumeration.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public int TapiError { get; }
Public ReadOnly Property TapiError As Integer
    Get
public:
property int TapiError {
    int get ();
}

Property Value

Type: Int32
See Also

Reference

TapiErrorEventArgs Class


TapiErrorEventHandler Delegate

TapiErrorEventHandler Delegate
Represents the method that will handle TapiError event.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public delegate void TapiErrorEventHandler(
    Object sender,
    TapiErrorEventArgs args
)
Public Delegate Sub TapiErrorEventHandler (
    sender As Object,
    args As TapiErrorEventArgs
)
public delegate void TapiErrorEventHandler(
    Object^ sender,
    TapiErrorEventArgs^ args
)

Parameters

sender
Type: SystemObject
The source of the event (currently not used by AddTapi.NET).
args
Type: Traysoft.AddTapiTapiErrorEventArgs
An TapiErrorEventArgs that contains event data.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiErrors Enumeration

TapiErrors Enumeration
Contains the most common Telephony API (TAPI) error numbers.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public enum TapiErrors
Public Enumeration TapiErrors
public enum class TapiErrors
Members
Member name | Value | Description
Allocated | -2147483647 | The line cannot be opened due to a persistent condition, such as that of a serial port being exclusively opened by another process.
BadDeviceID | -2147483646 | The specified device identifier or line device identifier is invalid or out of range.
BearerModeUnavail | -2147483645 | The bearer mode is invalid, the bearer mode is not available, or the call's bearer mode cannot be changed to the specified bearer mode.
CallUnavail | -2147483643 | All call appearances on the specified address are currently in use.
CompletionOverrun | -2147483642 | The maximum number of outstanding call completions has been exceeded.
ConferenceFull | -2147483641 | The maximum number of parties for a conference has been reached, or the requested number of parties cannot be satisfied.
DialBilling | -2147483640 | The dialable number contains dialing control characters that are not processed by the service provider.
DialDialTone | -2147483639 | The dialable number contains dialing control characters that are not processed by the service provider.
DialPrompt | -2147483638 | The dialable number contains dialing control characters that are not processed by the service provider.
DialQuiet | -2147483637 | The dialable number contains dialing control characters that are not processed by the service provider.
IncompatibleAPIVersion | -2147483636 | The application requested a TAPI version or version range that is either incompatible with, or cannot be supported by, the Telephony API implementation and the corresponding service provider.
IncompatibleExtVersion | -2147483635 | The application requested an extension version range that is either invalid or cannot be supported by the corresponding service provider.
IniFileCorrupt | -2147483634 | The Telephon.ini file cannot be read or understood properly by TAPI because of internal inconsistencies or formatting problems. For example, the [Locations], [Cards], or [Countries] section of the Telephon.ini file may be corrupted or inconsistent.
InUse | -2147483633 | The line device is in use and cannot currently be configured, allow a party to be added, allow a call to be answered, allow a call to be placed, or allow a call to be transferred.
InvalAddress | -2147483632 | The specified address (phone number or extension) is either invalid or not allowed. If invalid, the address contains invalid characters or digits, or the destination address contains dialing control characters, W, @, $, or ?, that are not supported by the service provider. If the address is not allowed, the specified address is either not assigned to the specified line or is not valid for address redirection.
InvalAddressID | -2147483631 | The specified address identifier is either invalid or out of range.
InvalAddressMode | -2147483630 | The specified address mode is invalid.
InvalAddressState | -2147483629 | The specified address state contains one or more bits that are not LINEADDRESSSTATE.
InvalAppHandle | -2147483628 | The application handle or the application registration handle is invalid.
InvalAppName | -2147483627 | The specified application name is invalid. The application name should not contain any non-displayable characters, and should be zero-terminated.
InvalBearerMode | -2147483626 | The specified bearer mode is invalid.
InvalCallComplMode | -2147483625 | The specified completion is invalid.
InvalCallHandle | -2147483624 | The specified call handle is not valid.
InvalCallParams | -2147483623 | The specified call parameters are invalid.
InvalCallPrivilege | -2147483622 | The specified call privilege parameter is invalid.
InvalCallSelect | -2147483621 | The specified select parameter is invalid.
InvalCallState | -2147483620 | The current state of a call is not a valid state for the requested operation.
InvalCallStateList | -2147483619 | The specified call state list is invalid.
InvalCard | -2147483618 | The permanent card identifier could not be found in any entry in the [Cards] section in the registry.
InvalCompletionID | -2147483617 | The completion identifier is invalid.
InvalConfCallHandle | -2147483616 | The specified call handle for the conference call is invalid or is not a handle for a conference call.
InvalConsultCallHandle | -2147483615 | The specified consultation call handle is invalid.
InvalCountryCode | -2147483614 | The specified country/region code is invalid.
InvalDeviceClass | -2147483613 | The line device has no associated device for the given device class, or the specified line does not support the indicated device class.
InvalDeviceHandle | -2147483612 | The line device handle is invalid.
InvalDialParams | -2147483611 | The dialing parameters are invalid.
InvalDigitList | -2147483610 | The specified digit list is invalid.
InvalDigitMode | -2147483609 | The specified digit mode is invalid.
InvalDigits | -2147483608 | The specified termination digits are not valid.
InvalExtVersion | -2147483607 | The service provider extension version number is invalid.
InvalGroupID | -2147483606 | The specified group identifier is invalid.
InvalLineHandle | -2147483605 | The specified call, device, line device, or line handle is invalid.
InvalLineState | -2147483604 | The device configuration may not be changed in the current line state.
InvalLocation | -2147483603 | The permanent location identifier could not be found in any entry in the [Locations] section in the registry.
InvalMediaList | -2147483602 | The specified media list is invalid.
InvalMediaMode | -2147483601 | The list of media types (modes) to be monitored contains invalid information, the specified media type parameter is invalid, or the service provider does not support the specified media type.
InvalMessageID | -2147483600 | The number given in MessageID is outside the range specified by the NumCompletionMessages member.
InvalParam | -2147483598 | A parameter or structure that a parameter points to contains invalid information, a country/region code is invalid, or the specified forward list parameter contains invalid information.
InvalParkID | -2147483597 | The park identifier is invalid.
InvalParkMode | -2147483596 | The specified park mode is invalid.
InvalPointer | -2147483595 | One or more of the specified pointer parameters are invalid, or a required pointer to an output parameter is NULL.
InvalPrivSelect | -2147483594 | An invalid flag or combination of flags was set for the Privileges parameter.
InvalRate | -2147483593 | The specified rate is invalid.
InvalRequestMode | -2147483592 | The RequestMode indicator is invalid.
InvalTerminalID | -2147483591 | The specified terminal identifier is invalid.
InvalTerminalMode | -2147483590 | The specified terminal modes parameter is invalid.
InvalTimeout | -2147483589 | Timeouts are not supported or a value falls outside the valid range.
InvalTone | -2147483588 | The specified custom tone does not represent a valid tone or is made up of too many frequencies or the specified tone structure does not describe a valid tone.
InvalToneList | -2147483587 | The specified tone list is invalid.
InvalToneMode | -2147483586 | The specified tone mode parameter is invalid.
InvalTransferMode | -2147483585 | The specified transfer mode parameter is invalid.
LineMapperFailed | -2147483584 | No lines were found that match the requirements specified in the CallParams parameter.
NoConference | -2147483583 | The specified call is not a conference call handle or a participant call.
NoDevice | -2147483582 | The specified device identifier, which was previously valid, is no longer accepted because the associated device has been removed from the system since TAPI was last initialized. Alternately, the line device has no associated device for the given device class.
NoDriver | -2147483581 | Either Tapiaddr.dll could not be located or the telephone service provider for the specified device found that one of its components is missing or corrupt in a way that was not detected at initialization time. The user should be advised to use the Telephony Control Panel to correct the problem.
NoMem | -2147483580 | Insufficient memory to perform the operation, or unable to lock memory.
NoRequest | -2147483579 | There currently is no request pending of the indicated mode, or the application is no longer the highest-priority application for the specified request mode.
NotOwner | -2147483578 | The application does not have owner privilege to the specified call.
NotRegistered | -2147483577 | The application is not registered as a request recipient for the indicated request mode.
OperationFailed | -2147483576 | The operation failed for an unspecified or unknown reason.
OperationUnavail | -2147483575 | The operation is not available, such as for the given device or specified line.
RateUnavail | -2147483574 | The service provider currently does not have enough bandwidth available for the specified rate.
ResourceUnavail | -2147483573 | Insufficient resources to complete the operation. For example, a line cannot be opened due to a dynamic resource overcommitment.
RequestOverrun | -2147483572 | More requests are pending than the device can handle.
StructureTooSmall | -2147483571 | The TotalSize member of a structure does not specify enough memory to contain the fixed portion of the specified structure.
TargetNotFound | -2147483570 | A target for the call handoff was not found.
TargetSelf | -2147483569 | The application invoking this operation is the target of the indirect handoff.
Uninitialized | -2147483568 | The operation was invoked before TAPI was initialized.
UserUserInfoTooBig | -2147483567 | The string containing user-user information is too long.
ReInit | -2147483566 | TAPI reinitialization has been requested, all applications should shut down its usage of TAPI.
AddressBlocked | -2147483565 | The specified address (phone number or extension) is blocked from being dialed on the specified call.
BillingRejected | -2147483564 | The billing mode of the call was rejected
InvalFeature | -2147483563 | The requested Feature parameter is invalid.
NoMultipleInstance | -2147483562 | A telephony service provider that does not support multiple instances is listed more than once in the [Providers] section in the registry. The application should advise the user to use the Telephony Control Panel to remove the duplicated driver.
InvalAgentID | -2147483561 | The specified agent identifier is invalid.
InvalAgentGroup | -2147483560 | The application referenced an agent group that is not valid.
InvalPassword | -2147483559 | The application used an invalid password.
InvalAgentState | -2147483558 | The application referenced an agent state that is not valid.
InvalAgentActivity | -2147483557 | The specified agent activity is not valid
DialVoiceDetect | -2147483556 | Use of the dial modifier (:) is not supported.
UserCancelled | -2147483555 | The user cancelled the call.
InvalAddressType | -2147483554 | The application referenced an address type that is not valid.
InvalAgentSessionState | -2147483553 | The agent session state is invalid.
Disconnected | -2147483552 | The call has been disconnected.
ServiceNotRunning | -2147483551 | The TAPI service is not running.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiEventArgs Class

TapiEventArgs Class
Provides data for the AddTapi.NET events.
Inheritance Hierarchy
SystemObject
SystemEventArgs
Traysoft.AddTapiTapiEventArgs
More...

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public class TapiEventArgs : EventArgs
Public Class TapiEventArgs
    Inherits EventArgs
public ref class TapiEventArgs : public EventArgs

The TapiEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Call | Gets TapiCall object associated with the event, if any.
Public property | Line | Gets TapiLine object associated with the event, if any.
Top
See Also

Reference

Traysoft.AddTapi Namespace
Inheritance Hierarchy
SystemObject
SystemEventArgs
Traysoft.AddTapiTapiEventArgs
Traysoft.AddTapiTapiCallInfoEventArgs
Traysoft.AddTapiTapiDeviceSpecificEventArgs
Traysoft.AddTapiTapiDigitDetectedEventArgs
Traysoft.AddTapiTapiErrorEventArgs
Traysoft.AddTapiTapiForwardingInfoEventArgs
Traysoft.AddTapiTapiGeneratedEventArgs
Traysoft.AddTapiTapiLineDeviceStateEventArgs


TapiEventArgs Properties

TapiEventArgs Properties

The TapiEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Call | Gets TapiCall object associated with the event, if any.
Public property | Line | Gets TapiLine object associated with the event, if any.
Top
See Also

Reference

TapiEventArgs Class


TapiEventArgs.Call Property

TapiEventArgsCall Property
Gets TapiCall object associated with the event, if any.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCall Call { get; }
Public ReadOnly Property Call As TapiCall
    Get
public:
property TapiCall^ Call {
    TapiCall^ get ();
}

Property Value

Type: TapiCall
See Also

Reference

TapiEventArgs Class


TapiEventArgs.Line Property

TapiEventArgsLine Property
Gets TapiLine object associated with the event, if any.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiLine Line { get; }
Public ReadOnly Property Line As TapiLine
    Get
public:
property TapiLine^ Line {
    TapiLine^ get ();
}

Property Value

Type: TapiLine
See Also

Reference

TapiEventArgs Class


TapiEventHandler Delegate

TapiEventHandler Delegate
Represents the method that will handle AddTapi.NET events.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public delegate void TapiEventHandler(
    Object sender,
    TapiEventArgs args
)
Public Delegate Sub TapiEventHandler (
    sender As Object,
    args As TapiEventArgs
)
public delegate void TapiEventHandler(
    Object^ sender,
    TapiEventArgs^ args
)

Parameters

sender
Type: SystemObject
The source of the event (currently not used by AddTapi.NET).
args
Type: Traysoft.AddTapiTapiEventArgs
An TapiEventArgs that contains event data.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiException Class

TapiException Class
The exception that is thrown when Telephony API (TAPI) error occurs.
Inheritance Hierarchy
SystemObject
SystemException
Traysoft.AddTapiTapiException
Traysoft.AddTapiTapiDisconnectException

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public class TapiException : Exception
Public Class TapiException
    Inherits Exception
public ref class TapiException : public Exception

The TapiException type exposes the following members.

Properties
 | Name | Description
Public property | TapiError | Gets the TAPI error number. Most common TAPI error numbers are listed in TapiErrors enumeration.
Top
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiException Properties

TapiException Properties

The TapiException type exposes the following members.

Properties
 | Name | Description
Public property | TapiError | Gets the TAPI error number. Most common TAPI error numbers are listed in TapiErrors enumeration.
Top
See Also

Reference

TapiException Class


TapiException.TapiError Property

TapiExceptionTapiError Property
Gets the TAPI error number. Most common TAPI error numbers are listed in TapiErrors enumeration.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public int TapiError { get; }
Public ReadOnly Property TapiError As Integer
    Get
public:
property int TapiError {
    int get ();
}

Property Value

Type: Int32
See Also

Reference

TapiException Class


TapiForwardEntry Class

TapiForwardEntry Class
Describes an entry of the forwarding instructions.
Inheritance Hierarchy
SystemObject
Traysoft.AddTapiTapiForwardEntry

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public class TapiForwardEntry
Public Class TapiForwardEntry
public ref class TapiForwardEntry

The TapiForwardEntry type exposes the following members.

Constructors
 | Name | Description
Public method | TapiForwardEntry | Initializes a new instance of the TapiForwardEntry class with the specified forward mode, destination number and caller number.
Top
Properties
 | Name | Description
Public property | CallerNumber | The number of a caller to be forwarded. Applicable only for selective call forwarding modes.
Public property | DestinationNumber | The destination number where calls are to be forwarded.
Public property | ForwardMode | Types of forwarding.
Top
See Also

Reference

Traysoft.AddTapi Namespace
TapiAddressGetForwardingInfo


TapiForwardEntry Constructor

TapiForwardEntry Constructor
Initializes a new instance of the TapiForwardEntry class with the specified forward mode, destination number and caller number.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiForwardEntry(
    TapiForwardMode forwardMode,
    string destinationNumber,
    string callerNumber
)
Public Sub New (
    forwardMode As TapiForwardMode,
    destinationNumber As String,
    callerNumber As String
)
public:
TapiForwardEntry(
    TapiForwardMode forwardMode,
    String^ destinationNumber,
    String^ callerNumber
)

Parameters

forwardMode
Type: Traysoft.AddTapiTapiForwardMode
Type of forwarding.
destinationNumber
Type: SystemString
The destination number where calls are to be forwarded.
callerNumber
Type: SystemString
The number of a caller to be forwarded. Applicable only for selective call forwarding modes.
Remarks
This method creates a TapiForwardEntry object representing one entry in the list of forwarding instructions for SetupForwarding(IEnumerableTapiForwardEntry, Int32, TapiAddress).
See Also

Reference

TapiForwardEntry Class


TapiForwardEntry Properties

TapiForwardEntry Properties

The TapiForwardEntry type exposes the following members.

Properties
 | Name | Description
Public property | CallerNumber | The number of a caller to be forwarded. Applicable only for selective call forwarding modes.
Public property | DestinationNumber | The destination number where calls are to be forwarded.
Public property | ForwardMode | Types of forwarding.
Top
See Also

Reference

TapiForwardEntry Class


TapiForwardEntry.CallerNumber Property

TapiForwardEntryCallerNumber Property
The number of a caller to be forwarded. Applicable only for selective call forwarding modes.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string CallerNumber { get; set; }
Public Property CallerNumber As String
    Get
    Set
public:
property String^ CallerNumber {
    String^ get ();
    void set (String^ value);
}

Property Value

Type: String
See Also

Reference

TapiForwardEntry Class


TapiForwardEntry.DestinationNumber Property

TapiForwardEntryDestinationNumber Property
The destination number where calls are to be forwarded.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string DestinationNumber { get; set; }
Public Property DestinationNumber As String
    Get
    Set
public:
property String^ DestinationNumber {
    String^ get ();
    void set (String^ value);
}

Property Value

Type: String
See Also

Reference

TapiForwardEntry Class


TapiForwardEntry.ForwardMode Property

TapiForwardEntryForwardMode Property
Types of forwarding.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiForwardMode ForwardMode { get; set; }
Public Property ForwardMode As TapiForwardMode
    Get
    Set
public:
property TapiForwardMode ForwardMode {
    TapiForwardMode get ();
    void set (TapiForwardMode value);
}

Property Value

Type: TapiForwardMode
See Also

Reference

TapiForwardEntry Class


TapiForwardingInfoEventArgs Class

TapiForwardingInfoEventArgs Class
Provides data for the ForwardingInfo event.
Inheritance Hierarchy
SystemObject
SystemEventArgs
Traysoft.AddTapiTapiEventArgs
Traysoft.AddTapiTapiForwardingInfoEventArgs

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public class TapiForwardingInfoEventArgs : TapiEventArgs
Public Class TapiForwardingInfoEventArgs
    Inherits TapiEventArgs
public ref class TapiForwardingInfoEventArgs : public TapiEventArgs

The TapiForwardingInfoEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Address | Gets the address for which forwarding information has changed.
Top
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiForwardingInfoEventArgs Properties

TapiForwardingInfoEventArgs Properties

The TapiForwardingInfoEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Address | Gets the address for which forwarding information has changed.
Top
See Also

Reference

TapiForwardingInfoEventArgs Class


TapiForwardingInfoEventArgs.Address Property

TapiForwardingInfoEventArgsAddress Property
Gets the address for which forwarding information has changed.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiAddress Address { get; }
Public ReadOnly Property Address As TapiAddress
    Get
public:
property TapiAddress^ Address {
    TapiAddress^ get ();
}

Property Value

Type: TapiAddress
See Also

Reference

TapiForwardingInfoEventArgs Class


TapiForwardingInfoEventHandler Delegate

TapiForwardingInfoEventHandler Delegate
Represents the method that will handle ForwardingInfo event.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public delegate void TapiForwardingInfoEventHandler(
    Object sender,
    TapiForwardingInfoEventArgs args
)
Public Delegate Sub TapiForwardingInfoEventHandler (
    sender As Object,
    args As TapiForwardingInfoEventArgs
)
public delegate void TapiForwardingInfoEventHandler(
    Object^ sender,
    TapiForwardingInfoEventArgs^ args
)

Parameters

sender
Type: SystemObject
The source of the event (currently not used by AddTapi.NET).
args
Type: Traysoft.AddTapiTapiForwardingInfoEventArgs
An TapiForwardingInfoEventArgs that contains event data.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiForwardMode Enumeration

TapiForwardMode Enumeration
Describes the conditions under which calls can be forwarded.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
[FlagsAttribute]
public enum TapiForwardMode
<FlagsAttribute>
Public Enumeration TapiForwardMode
[FlagsAttribute]
public enum class TapiForwardMode
Members
Member name | Value | Description
Unconditional | 1 | Forward all calls unconditionally, irrespective of their origin. Use this value when unconditional forwarding for internal and external calls cannot be controlled separately. Unconditional forwarding overrides forwarding on busy and/or no answer conditions.
UnconditionalInternal | 2 | Forward all internal calls unconditionally. Use this value when unconditional forwarding for internal and external calls can be controlled separately.
UnconditionalExternal | 4 | Forward all external calls unconditionally. Use this value when unconditional forwarding for internal and external calls can be controlled separately.
UnconditionalSpecific | 8 | Unconditionally forward all calls from a specified phone number or extension (selective call forwarding).
Busy | 16 | Forward all calls on busy, irrespective of their origin. Use this value when forwarding for internal and external calls on busy and on no answer cannot be controlled separately.
BusyInternal | 32 | Forward all internal calls on busy. Use this value when forwarding for internal and external calls on busy and on no answer can be controlled separately.
BusyExternal | 64 | Forward all external calls on busy. Use this value when forwarding for internal and external calls on busy and on no answer can be controlled separately.
BusySpecific | 128 | Forward on busy all calls from a specified phone number or extension (selective call forwarding).
NoAnswer | 256 | Forward all calls on no answer, irrespective of their origin. Use this value when call forwarding for internal and external calls on no answer cannot be controlled separately.
NoAnswerInternal | 512 | Forward all internal calls on no answer. Use this value when forwarding for internal and external calls on no answer can be controlled separately.
NoAnswerExternal | 1024 | Forward all external calls on no answer. Use this value when forwarding for internal and external calls on no answer can be controlled separately.
NoAnswerSpecific | 2048 | Forward on no answer all calls from a specified phone number or extension (selective call forwarding).
BusyNoAnswer | 4096 | Forward all calls on busy/no answer, irrespective of their origin. Use this value when forwarding for internal and external calls on busy and on no answer cannot be controlled separately.
BusyNoAnswerInternal | 8192 | Forward all internal calls on busy/no answer. Use this value when call forwarding on busy and on no answer cannot be controlled separately for internal calls.
BusyNoAnswerExternal | 16384 | Forward all external calls on busy/no answer. Use this value when call forwarding on busy and on no answer cannot be controlled separately for internal calls.
BusyNoAnswerSpecific | 32768 | Forward on busy/no answer all calls from a specified phone number or extension (selective call forwarding).
Unknown | 65536 | Calls are forwarded, but the conditions under which forwarding will occur are not known at this time. It is possible that the conditions may become known at a future time.
Unavailable | 131072 | Calls are forwarded, but the conditions under which forwarding will occur are not known, and will never be known by the service provider.
All | 262143 | A mask that includes all forward modes.
Remarks

The bit flags defined by TapiForwardMode are not independent of each other. Unconditional forwarding ignores any specific condition such as busy or no answer. If unconditional forwarding is not in effect, then forwarding on busy and on no answer can be controlled separately or not separately. If controlled separately, the Busy and NoAnswer flags can be used separately. If not controlled separately, the BusyNoAnswer flags must be used. Similarly, if forwarding of internal and external calls can be controlled separately, then Internal and External flags can be used separately; otherwise the combination is used.

ForwardModes indicates which forwarding modes are available for each address assigned to a line.

See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiGeneratedEventArgs Class

TapiGeneratedEventArgs Class
Provides data for the Generated event.
Inheritance Hierarchy
SystemObject
SystemEventArgs
Traysoft.AddTapiTapiEventArgs
Traysoft.AddTapiTapiGeneratedEventArgs

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public class TapiGeneratedEventArgs : TapiEventArgs
Public Class TapiGeneratedEventArgs
    Inherits TapiEventArgs
public ref class TapiGeneratedEventArgs : public TapiEventArgs

The TapiGeneratedEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Mode | Gets the conditions under which digit or tone generation is terminated.
Top
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiGeneratedEventArgs Properties

TapiGeneratedEventArgs Properties

The TapiGeneratedEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | Mode | Gets the conditions under which digit or tone generation is terminated.
Top
See Also

Reference

TapiGeneratedEventArgs Class


TapiGeneratedEventArgs.Mode Property

TapiGeneratedEventArgsMode Property
Gets the conditions under which digit or tone generation is terminated.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiGeneratedMode Mode { get; }
Public ReadOnly Property Mode As TapiGeneratedMode
    Get
public:
property TapiGeneratedMode Mode {
    TapiGeneratedMode get ();
}

Property Value

Type: TapiGeneratedMode
See Also

Reference

TapiGeneratedEventArgs Class


TapiGeneratedEventHandler Delegate

TapiGeneratedEventHandler Delegate
Represents the method that will handle Generated event.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public delegate void TapiGeneratedEventHandler(
    Object sender,
    TapiGeneratedEventArgs args
)
Public Delegate Sub TapiGeneratedEventHandler (
    sender As Object,
    args As TapiGeneratedEventArgs
)
public delegate void TapiGeneratedEventHandler(
    Object^ sender,
    TapiGeneratedEventArgs^ args
)

Parameters

sender
Type: SystemObject
The source of the event (currently not used by AddTapi.NET).
args
Type: Traysoft.AddTapiTapiGeneratedEventArgs
An TapiGeneratedEventArgs that contains event data.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiGeneratedMode Enumeration

TapiGeneratedMode Enumeration
Describes the conditions under which digit or tone generation is terminated.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public enum TapiGeneratedMode
Public Enumeration TapiGeneratedMode
public enum class TapiGeneratedMode
Members
Member name | Value | Description
Cancel | 0 | The digit or tone generation request was canceled by this application, by another application, or because the call terminated. This value can also be returned when digit or tone generation cannot be completed due to internal failure of the service provider.
Done | 1 | The requested number of digits or requested tones have been generated for the requested duration.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiLine Class

TapiLine Class
Represents a telephony line device.
Inheritance Hierarchy
SystemObject
Traysoft.AddTapiTapiLine

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public class TapiLine
Public Class TapiLine
public ref class TapiLine

The TapiLine type exposes the following members.

Properties
 | Name | Description
Public property | Addresses | Gets a list of addresses available on the line.
Public property | AudioInputBufferSize | Gets or sets the size of the audio input buffer, in milliseconds.
Public property | AudioInputFormat | Gets or sets the format of audio input.
Public property | AudioOutputBufferSize | Gets or sets the size of the audio output buffer, in milliseconds.
Public property | AudioOutputFormat | Gets or sets the format of audio output.
Public property | AvailableMediaModes | Indicates which media types (modes) the line device supports.
Public property | Calls | Gets a list of calls on the line.
Public property | DeviceSpecificExtensionID | Gets an identifier of the device specific extension supported by the line device.
Public property | DeviceSpecificExtensionVersion | Gets negotiated version of the device specific extension in use on the line.
Public property | DeviceSpecificInfo | Gets device specific information about the line device.
Public property | DeviceStatus | Gets the current status of the line device.
Public property | DisconnectOnBusy | Specifies if calls on the line should be automatically disconnected when a busy signal is detected.
Public property | IsOpen | Indicates whether the line has been opened for incoming or outgoing calls.
Public property | MaxNumActiveCalls | Gets the maximum number of calls that can be active on the line.
Public property | Name | Gets the name of the line.
Public property | NoAnswerTimeout | Gets or sets the number of seconds AddTapi.NET should wait for an answer on outgoing calls.
Public property | OpenMediaModes | Indicates for which media types (modes) the line device is currently open.
Public property | PermanentID | Gets the permanent ID of the line.
Public property | ProviderInfo | Gets the Telephony Service Provider (TSP) information for the line.
Public property | RingsToAnswer | Gets or sets the number of rings AddTapi.NET should wait before answering incoming calls.
Public property | SpeechRate | Gets or sets the rate of speech on the line.
 | SpeechVoice | Gets or sets text-to-speech voice to be used for text synthesis on the line.
Public property | SpeechVolume | Gets or sets the volume of speech on the line.
Public property | SupportsVoice | Indicates whether the line suppots voice functions.
Public property | SwitchInfo | Gets the switch (PBX) information for the line.
Public property | WaitForCallerID | Indicates whether AddTapi.NET should wait for Caller ID to arrive before reporting or answering incoming calls.
Top
Methods
 | Name | Description
Public method | Close | Closes the line. Closing the line stops monitoring of incoming calls on the line.
Public method | DeviceSpecific(Byte, TapiAddress, TapiCall, Int32) | Provides access to device specific functionality.
 | DeviceSpecific(Object, TapiAddress, TapiCall, Type) | Provides access to device specific functionality.
Public method | DeviceSpecificFeature(Byte, UInt32, Int32) | Provides access to device specific features.
 | DeviceSpecificFeature(Object, UInt32, Type) | Provides access to device specific features.
 | Dial(String, Boolean) | Dials an outgoing call on the line.
 | Dial(String, Boolean, TapiMediaMode) | Dials an outgoing call on the line using specified media mode.
 | Dial(String, Boolean, TapiMediaMode, String) | Dials an outgoing call on the line using specified media mode and originating address.
 | Dial(String, Boolean, TapiMediaMode, TapiAddress) | Dials an outgoing call on the line using specified media mode and originating TapiAddress.
 | NegotiateDeviceSpecificExtensionVersion | Negotiates a version of the device specific extension to use with the line.
 | Open(Boolean, TapiCallHandler) | Opens the line. After the line is opened, it can be used to monitor incoming calls and/or to place outgoing calls.
 | Open(Boolean, TapiCallHandler, TapiMediaMode) | Opens the line for calls with selected media types (modes). After the line is opened, it can be used to monitor incoming calls and/or to place outgoing calls.
 | Open(Boolean, TapiCallHandler, TapiMediaMode, TapiCallPrivilege) | Opens the line for calls with selected media types (modes) and call privileges. After the line is opened, it can be used to monitor incoming calls and/or to place outgoing calls.
Public method | Pickup(String, String) | Picks up a call ringing at the specified phone number or extension.
Public method | Pickup(String, String, TapiAddress) | Picks up a call ringing at the specified phone number or extension.
 | SetupConference | Sets up a conference call for the addition of the third party.
 | SetupForwarding | Sets up forwarding of calls destined for the specified address on the line, according to the specified forwarding instructions.
Public method | ToString | Overriden. Returns a string that contains the name of the line. (Overrides ObjectToString.)
Public method | Unpark(String) | Retrieves the call parked at the specified phone number or extension.
Public method | Unpark(String, TapiAddress) | Retrieves the call parked at the specified phone number or extension.
Top
Remarks

Telephony system is represented as a set of TapiLine objects, each with one or more addresses. Addresses collection lists TapiAddress objects representing addresses (phone numbers or extensions) associated with the line. Most systems have one line for each phone number or extension, with one address on each line.

AddTapi.NET creates a TapiLine object for each telephony line device installed on the computer. The application can subscribe to LineAdded and LineRemoved events to receive notifications when a line device is added or removed.

See Also

Reference

Traysoft.AddTapi Namespace
TapiAppLines
TapiAppLineAdded
TapiAppLineRemoved


TapiLine Properties

TapiLine Properties

The TapiLine type exposes the following members.

Properties
 | Name | Description
Public property | Addresses | Gets a list of addresses available on the line.
Public property | AudioInputBufferSize | Gets or sets the size of the audio input buffer, in milliseconds.
Public property | AudioInputFormat | Gets or sets the format of audio input.
Public property | AudioOutputBufferSize | Gets or sets the size of the audio output buffer, in milliseconds.
Public property | AudioOutputFormat | Gets or sets the format of audio output.
Public property | AvailableMediaModes | Indicates which media types (modes) the line device supports.
Public property | Calls | Gets a list of calls on the line.
Public property | DeviceSpecificExtensionID | Gets an identifier of the device specific extension supported by the line device.
Public property | DeviceSpecificExtensionVersion | Gets negotiated version of the device specific extension in use on the line.
Public property | DeviceSpecificInfo | Gets device specific information about the line device.
Public property | DeviceStatus | Gets the current status of the line device.
Public property | DisconnectOnBusy | Specifies if calls on the line should be automatically disconnected when a busy signal is detected.
Public property | IsOpen | Indicates whether the line has been opened for incoming or outgoing calls.
Public property | MaxNumActiveCalls | Gets the maximum number of calls that can be active on the line.
Public property | Name | Gets the name of the line.
Public property | NoAnswerTimeout | Gets or sets the number of seconds AddTapi.NET should wait for an answer on outgoing calls.
Public property | OpenMediaModes | Indicates for which media types (modes) the line device is currently open.
Public property | PermanentID | Gets the permanent ID of the line.
Public property | ProviderInfo | Gets the Telephony Service Provider (TSP) information for the line.
Public property | RingsToAnswer | Gets or sets the number of rings AddTapi.NET should wait before answering incoming calls.
Public property | SpeechRate | Gets or sets the rate of speech on the line.
 | SpeechVoice | Gets or sets text-to-speech voice to be used for text synthesis on the line.
Public property | SpeechVolume | Gets or sets the volume of speech on the line.
Public property | SupportsVoice | Indicates whether the line suppots voice functions.
Public property | SwitchInfo | Gets the switch (PBX) information for the line.
Public property | WaitForCallerID | Indicates whether AddTapi.NET should wait for Caller ID to arrive before reporting or answering incoming calls.
Top
See Also

Reference

TapiLine Class


TapiLine.Addresses Property

TapiLineAddresses Property
Gets a list of addresses available on the line.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public IList<TapiAddress> Addresses { get; }
Public ReadOnly Property Addresses As IList(Of TapiAddress)
    Get
public:
property IList<TapiAddress^>^ Addresses {
    IList<TapiAddress^>^ get ();
}

Property Value

Type: IList TapiAddress
Remarks
Telephony system is modeled as a set of lines represented by TapiLine objects, each with one or more addresses represented by TapiAddress objects. Most systems have one line for each phone number or extension, with one address on each line. Use Addresses property to obtain a list of available addresses for systems with multiple addresses on each line.
See Also

Reference

TapiLine Class


TapiLine.AudioInputBufferSize Property

TapiLineAudioInputBufferSize Property
Gets or sets the size of the audio input buffer, in milliseconds.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public int AudioInputBufferSize { get; set; }
Public Property AudioInputBufferSize As Integer
    Get
    Set
public:
property int AudioInputBufferSize {
    int get ();
    void set (int value);
}

Property Value

Type: Int32
Remarks
This property specifies the size of audio buffer used to record wave files on the line. You can adjust audio buffer size if you get "choppy" sound recordings. Default size of the audio input buffer is 100 milliseconds. Valid range is 50 - 2000. In addition to setting AudioInputBufferSize property, you might need to adjust audio buffer size in the device driver of the telephony hardware to get the best input quality.
See Also

Reference

TapiLine Class


TapiLine.AudioInputFormat Property

TapiLineAudioInputFormat Property
Gets or sets the format of audio input.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiAudioFormat AudioInputFormat { get; set; }
Public Property AudioInputFormat As TapiAudioFormat
    Get
    Set
public:
property TapiAudioFormat AudioInputFormat {
    TapiAudioFormat get ();
    void set (TapiAudioFormat value);
}

Property Value

Type: TapiAudioFormat
Remarks
This property specifies the format for the audio input on the line. Default value is TapiAudioFormat.Default, which means that AddTapi.NET will detect supported audio format automatically. Some telephony devices do not report supported audio formats properly. You will need to set AudioInputFormat to a specific format (for example TapiAudioFormat.PCM_8kHz16BitMono) for such devices.
See Also

Reference

TapiLine Class


TapiLine.AudioOutputBufferSize Property

TapiLineAudioOutputBufferSize Property
Gets or sets the size of the audio output buffer, in milliseconds.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public int AudioOutputBufferSize { get; set; }
Public Property AudioOutputBufferSize As Integer
    Get
    Set
public:
property int AudioOutputBufferSize {
    int get ();
    void set (int value);
}

Property Value

Type: Int32
Remarks
This property specifies the size of audio buffer used to play wave files and speak text on the line. You can adjust audio buffer size if you get "choppy" sound. Default size of the audio output buffer is 500 milliseconds. Valid range is 200 - 5000. In addition to setting AudioOutputBufferSize property, you might need to adjust audio buffer size in the device driver of the telephony hardware to get the best output quality.
See Also

Reference

TapiLine Class


TapiLine.AudioOutputFormat Property

TapiLineAudioOutputFormat Property
Gets or sets the format of audio output.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiAudioFormat AudioOutputFormat { get; set; }
Public Property AudioOutputFormat As TapiAudioFormat
    Get
    Set
public:
property TapiAudioFormat AudioOutputFormat {
    TapiAudioFormat get ();
    void set (TapiAudioFormat value);
}

Property Value

Type: TapiAudioFormat
Remarks
This property specifies the format for the audio output on the line. Default value is TapiAudioFormat.Default, which means that AddTapi.NET will detect supported audio format automatically. Some telephony devices do not report supported audio formats properly. You will need to set AudioOutputFormat to a specific format (for example TapiAudioFormat.PCM_8kHz16BitMono) for such devices.
See Also

Reference

TapiLine Class


TapiLine.AvailableMediaModes Property

TapiLineAvailableMediaModes Property
Indicates which media types (modes) the line device supports.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiMediaMode AvailableMediaModes { get; }
Public ReadOnly Property AvailableMediaModes As TapiMediaMode
    Get
public:
property TapiMediaMode AvailableMediaModes {
    TapiMediaMode get ();
}

Property Value

Type: TapiMediaMode
See Also

Reference

TapiLine Class


TapiLine.Calls Property

TapiLineCalls Property
Gets a list of calls on the line.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public IList<TapiCall> Calls { get; }
Public ReadOnly Property Calls As IList(Of TapiCall)
    Get
public:
property IList<TapiCall^>^ Calls {
    IList<TapiCall^>^ get ();
}

Property Value

Type: IList TapiCall
Remarks
Calls is a collection of TapiCall objects representing calls on the line. This collection is updated automatically when a new call appears on the line or when a call becomes idle. Your application can subscribe to IncomingCall and OutgoingCall events to receive notifications when a new incoming or outgoing call is detected.
See Also

Reference

TapiLine Class
Traysoft.AddTapi Namespace
Traysoft.AddTapiTapiCall
TapiAppIncomingCall
TapiAppOutgoingCall


TapiLine.DeviceSpecificExtensionID Property

TapiLineDeviceSpecificExtensionID Property
Gets an identifier of the device specific extension supported by the line device.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiDeviceSpecificExtensionID DeviceSpecificExtensionID { get; }
Public ReadOnly Property DeviceSpecificExtensionID As TapiDeviceSpecificExtensionID
    Get
public:
property TapiDeviceSpecificExtensionID^ DeviceSpecificExtensionID {
    TapiDeviceSpecificExtensionID^ get ();
}

Property Value

Type: TapiDeviceSpecificExtensionID
Remarks

Many TSPs provide functionality specific to the telephony system using device specific extensions. Four IDs in TapiDeviceSpecificExtensionID together specify a universally unique extension identifier that identifies a line device class extension. All 4 IDs are zeros if the line provides no extensions.

Please refer to the TAPI documentation for the telephony hardware to find out about device specific functionality supported by the telephony service provider.

See Also

Reference

TapiLine Class
Traysoft.AddTapi Namespace
TapiLineNegotiateDeviceSpecificExtensionVersion(UInt32, UInt32)


TapiLine.DeviceSpecificExtensionVersion Property

TapiLineDeviceSpecificExtensionVersion Property
Gets negotiated version of the device specific extension in use on the line.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public uint DeviceSpecificExtensionVersion { get; }
Public ReadOnly Property DeviceSpecificExtensionVersion As UInteger
    Get
public:
property unsigned int DeviceSpecificExtensionVersion {
    unsigned int get ();
}

Property Value

Type: UInt32
A version number of the device specific extension negotiated using NegotiateDeviceSpecificExtensionVersion(UInt32, UInt32). The high-order word is the major version number; the low-order word is the minor version number. For example, version 2.1 is represented as 0x00020001 (hex 20001).
See Also

Reference

TapiLine Class
Traysoft.AddTapi Namespace
TapiLineNegotiateDeviceSpecificExtensionVersion(UInt32, UInt32)


TapiLine.DeviceSpecificInfo Property

TapiLineDeviceSpecificInfo Property
Gets device specific information about the line device.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public byte[] DeviceSpecificInfo { get; }
Public ReadOnly Property DeviceSpecificInfo As Byte()
    Get
public:
property array<unsigned char>^ DeviceSpecificInfo {
    array<unsigned char>^ get ();
}

Property Value

Type: Byte
Remarks

Many TSPs provide functionality specific to the telephony system using device specific extensions. Please refer to the TAPI documentation for the telephony hardware to find out about device specific functionality supported by the telephony service provider.

DeviceSpecificInfo property allows the application to retrieve device specific information about the line. The information provided in DeviceSpecificInfo property is described in TAPI documentation for the telephony hardware.

The application has to negotiate a version of the extension supported by the line device using NegotiateDeviceSpecificExtensionVersion(UInt32, UInt32) before opening the line in order to use device specific functionality.

See Also

Reference

TapiLine Class
Traysoft.AddTapi Namespace
TapiLineNegotiateDeviceSpecificExtensionVersion(UInt32, UInt32)
TapiLineDeviceSpecific(Object, TapiAddress, TapiCall, Type)


TapiLine.DeviceStatus Property

TapiLineDeviceStatus Property
Gets the current status of the line device.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiLineDeviceStatus DeviceStatus { get; }
Public ReadOnly Property DeviceStatus As TapiLineDeviceStatus
    Get
public:
property TapiLineDeviceStatus^ DeviceStatus {
    TapiLineDeviceStatus^ get ();
}

Property Value

Type: TapiLineDeviceStatus
See Also

Reference

TapiLine Class


TapiLine.DisconnectOnBusy Property

TapiLineDisconnectOnBusy Property
Specifies if calls on the line should be automatically disconnected when a busy signal is detected.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public bool DisconnectOnBusy { get; set; }
Public Property DisconnectOnBusy As Boolean
    Get
    Set
public:
property bool DisconnectOnBusy {
    bool get ();
    void set (bool value);
}

Property Value

Type: Boolean
Remarks

If DisconnectOnBusy property is true (default value), AddTapi.NET disconnects the call and sets DisconnectMode to Busy when a busy signal is detected. This behavior is appropriate for most applications.

Set DisconnectOnBusy property to false if the application needs to control when busy calls are disconnected. Please note that the application has to call Disconnect in order to disconnect the call in busy state and release the line.
See Also

Reference

TapiLine Class


TapiLine.IsOpen Property

TapiLineIsOpen Property
Indicates whether the line has been opened for incoming or outgoing calls.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public bool IsOpen { get; }
Public ReadOnly Property IsOpen As Boolean
    Get
public:
property bool IsOpen {
    bool get ();
}

Property Value

Type: Boolean
Remarks
This property is true if the line is currently open, i.e. Open(Boolean, TapiCallHandler) was called and the line was not closed yet using Close. Line has to be open in order to place outgoing calls or receive incoming calls on the line.
See Also

Reference

TapiLine Class
Traysoft.AddTapi Namespace
TapiLineOpen(Boolean, TapiCallHandler)
TapiLineClose


TapiLine.MaxNumActiveCalls Property

TapiLineMaxNumActiveCalls Property
Gets the maximum number of calls that can be active on the line.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public int MaxNumActiveCalls { get; }
Public ReadOnly Property MaxNumActiveCalls As Integer
    Get
public:
property int MaxNumActiveCalls {
    int get ();
}

Property Value

Type: Int32
Maximum number of (minimum bandwidth) calls that can be active (connected) on the line at any one time. The actual number of active calls may be lower if higher bandwidth calls have been established on the line.
See Also

Reference

TapiLine Class


TapiLine.Name Property

TapiLineName Property
Gets the name of the line.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string Name { get; }
Public ReadOnly Property Name As String
    Get
public:
property String^ Name {
    String^ get ();
}

Property Value

Type: String
Remarks
This property contains a user-friendly name of the telephony line device. This is the same name as displayed in the Telephony applet in the Control Panel. Users can rename a line in the Control Panel. If the application stores configuration settings associated with the line, PermanentID should be used instead of Name as the line identifier.
See Also

Reference

TapiLine Class


TapiLine.NoAnswerTimeout Property

TapiLineNoAnswerTimeout Property
Gets or sets the number of seconds AddTapi.NET should wait for an answer on outgoing calls.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public int NoAnswerTimeout { get; set; }
Public Property NoAnswerTimeout As Integer
    Get
    Set
public:
property int NoAnswerTimeout {
    int get ();
    void set (int value);
}

Property Value

Type: Int32
Remarks
When AddTapi.NET makes an outgoing call, it waits NoAnswerTimeout seconds for an answer before reporting that the call was disconnected because of no answer. The line must support predictive dialing (also called hardware answer detection) in order for AddTapi.NET to detect if outgoing call was answered. Most voice modems do not support predictive dialing and report that the call is connected immediately after the number has been dialed, before called party picks up the phone. In such case this property is ignored and "no answer" is never reported.
See Also

Reference

TapiLine Class
Traysoft.AddTapi Namespace
TapiAppCallConnected
TapiAppCallDisconnected
Traysoft.AddTapiTapiDisconnectMode


TapiLine.OpenMediaModes Property

TapiLineOpenMediaModes Property
Indicates for which media types (modes) the line device is currently open.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiMediaMode OpenMediaModes { get; }
Public ReadOnly Property OpenMediaModes As TapiMediaMode
    Get
public:
property TapiMediaMode OpenMediaModes {
    TapiMediaMode get ();
}

Property Value

Type: TapiMediaMode
See Also

Reference

TapiLine Class


TapiLine.PermanentID Property

TapiLinePermanentID Property
Gets the permanent ID of the line.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public long PermanentID { get; }
Public ReadOnly Property PermanentID As Long
    Get
public:
property long long PermanentID {
    long long get ();
}

Property Value

Type: Int64
Remarks
PermanentID stays the same after the line is renamed or re-installed. If your application stores configuration settings associated with the line, you should use PermanentID instead of Name as the line identifier.
See Also

Reference

TapiLine Class


TapiLine.ProviderInfo Property

TapiLineProviderInfo Property
Gets the Telephony Service Provider (TSP) information for the line.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string ProviderInfo { get; }
Public ReadOnly Property ProviderInfo As String
    Get
public:
property String^ ProviderInfo {
    String^ get ();
}

Property Value

Type: String
Remarks
ProviderInfo provides information about the provider hardware and/or software, such as the vendor name and version numbers of hardware and software.
See Also

Reference

TapiLine Class


TapiLine.RingsToAnswer Property

TapiLineRingsToAnswer Property
Gets or sets the number of rings AddTapi.NET should wait before answering incoming calls.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public int RingsToAnswer { get; set; }
Public Property RingsToAnswer As Integer
    Get
    Set
public:
property int RingsToAnswer {
    int get ();
    void set (int value);
}

Property Value

Type: Int32
Remarks
This property specifies how long AddTapi.NET waits before answering incoming calls. Set this property to zero if you do not want the application to answer all incoming calls automatically. Call Answer method in order to answer the call when RingsToAnswer is set to zero. If telephony hardware reports incoming ring count, AddTapi.NET waits the specified number of rings. If incoming ring count is not available, AddTapi.NET waits RingsToAnswer * 6 seconds before answering a call.
See Also

Reference

TapiLine Class


TapiLine.SpeechRate Property

TapiLineSpeechRate Property
Gets or sets the rate of speech on the line.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public int SpeechRate { get; set; }
Public Property SpeechRate As Integer
    Get
    Set
public:
property int SpeechRate {
    int get ();
    void set (int value);
}

Property Value

Type: Int32
Remarks
This property specifies the speaking rate (speed) of the voice. Supported values range from -10 to 10, where -10 is the slowest and 10 is the fastest rate.
See Also

Reference

TapiLine Class


TapiLine.SpeechVoice Property

TapiLineSpeechVoice Property
Gets or sets text-to-speech voice to be used for text synthesis on the line.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiVoice SpeechVoice { get; set; }
Public Property SpeechVoice As TapiVoice
    Get
    Set
public:
property TapiVoice^ SpeechVoice {
    TapiVoice^ get ();
    void set (TapiVoice^ value);
}

Property Value

Type: TapiVoice
Remarks
This property sets the text-to-speech (TTS) voice to use for subsequent TapiCall.Speak calls on the line. The list of available TTS voices is obtained from the Voices collection. To use default voice selected in the Speech applet in the Control Panel, set SpeechVoice property to null (Nothing in Visual Basic).
Examples
The following code shows how to set text-to-speech voice for text synthesis on the line.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiLine line = TapiApp.Lines[0];
TapiVoice voice = TapiApp.Voices[0];
line.SpeechVoice = voice;
TapiApp.Initialize("MyApp")
Dim objLine As TapiLine
objLine = TapiApp.Lines(0)
Dim objVoice As TapiVoice
objVoice = TapiApp.Voices(0)
objLine.SpeechVoice = objVoice;

No code example is currently available or this language may not be supported.

See Also

Reference

TapiLine Class
Traysoft.AddTapi Namespace
TapiAppVoices
TapiCallSpeak(String, Boolean)


TapiLine.SpeechVolume Property

TapiLineSpeechVolume Property
Gets or sets the volume of speech on the line.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public int SpeechVolume { get; set; }
Public Property SpeechVolume As Integer
    Get
    Set
public:
property int SpeechVolume {
    int get ();
    void set (int value);
}

Property Value

Type: Int32
Remarks
This property specifies the volume level of text synthesis. Volume levels are specified in percentage values ranging from zero to 100.
See Also

Reference

TapiLine Class


TapiLine.SupportsVoice Property

TapiLineSupportsVoice Property
Indicates whether the line suppots voice functions.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public bool SupportsVoice { get; }
Public ReadOnly Property SupportsVoice As Boolean
    Get
public:
property bool SupportsVoice {
    bool get ();
}

Property Value

Type: Boolean
Remarks
This property shows if the line supports voice functions, such as playing wave files and speaking text. Line devices that do not support voice cannot be opened in voice mode. If you try to open such line in automated voice mode using Open(Boolean, TapiCallHandler, TapiMediaMode), AddTapi.NET will throw TapiException.
See Also

Reference

TapiLine Class
Traysoft.AddTapi Namespace
TapiLineOpen(Boolean, TapiCallHandler, TapiMediaMode)


TapiLine.SwitchInfo Property

TapiLineSwitchInfo Property
Gets the switch (PBX) information for the line.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string SwitchInfo { get; }
Public ReadOnly Property SwitchInfo As String
    Get
public:
property String^ SwitchInfo {
    String^ get ();
}

Property Value

Type: String
Remarks
SwitchInfo provides information about the switch to which the line device is connected, such as the switch manufacturer, the model name, the software version, and so on.
See Also

Reference

TapiLine Class


TapiLine.WaitForCallerID Property

TapiLineWaitForCallerID Property
Indicates whether AddTapi.NET should wait for Caller ID to arrive before reporting or answering incoming calls.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public bool WaitForCallerID { get; set; }
Public Property WaitForCallerID As Boolean
    Get
    Set
public:
property bool WaitForCallerID {
    bool get ();
    void set (bool value);
}

Property Value

Type: Boolean
Remarks
After a new incoming call is detected, AddTapi.NET waits up to 3 seconds for Caller ID information to arrive before reporting or answering new incoming call. Set this property to false if you do not want AddTapi.NET to wait for Caller ID and process new incoming calls immediately. In this case the application will have to handle CallInfo event to find out when Caller ID information becomes available in the TapiCall object.
See Also

Reference

TapiLine Class


TapiLine Methods

TapiLine Methods

The TapiLine type exposes the following members.

Methods
 | Name | Description
Public method | Close | Closes the line. Closing the line stops monitoring of incoming calls on the line.
Public method | DeviceSpecific(Byte, TapiAddress, TapiCall, Int32) | Provides access to device specific functionality.
 | DeviceSpecific(Object, TapiAddress, TapiCall, Type) | Provides access to device specific functionality.
Public method | DeviceSpecificFeature(Byte, UInt32, Int32) | Provides access to device specific features.
 | DeviceSpecificFeature(Object, UInt32, Type) | Provides access to device specific features.
 | Dial(String, Boolean) | Dials an outgoing call on the line.
 | Dial(String, Boolean, TapiMediaMode) | Dials an outgoing call on the line using specified media mode.
 | Dial(String, Boolean, TapiMediaMode, String) | Dials an outgoing call on the line using specified media mode and originating address.
 | Dial(String, Boolean, TapiMediaMode, TapiAddress) | Dials an outgoing call on the line using specified media mode and originating TapiAddress.
 | NegotiateDeviceSpecificExtensionVersion | Negotiates a version of the device specific extension to use with the line.
 | Open(Boolean, TapiCallHandler) | Opens the line. After the line is opened, it can be used to monitor incoming calls and/or to place outgoing calls.
 | Open(Boolean, TapiCallHandler, TapiMediaMode) | Opens the line for calls with selected media types (modes). After the line is opened, it can be used to monitor incoming calls and/or to place outgoing calls.
 | Open(Boolean, TapiCallHandler, TapiMediaMode, TapiCallPrivilege) | Opens the line for calls with selected media types (modes) and call privileges. After the line is opened, it can be used to monitor incoming calls and/or to place outgoing calls.
Public method | Pickup(String, String) | Picks up a call ringing at the specified phone number or extension.
Public method | Pickup(String, String, TapiAddress) | Picks up a call ringing at the specified phone number or extension.
 | SetupConference | Sets up a conference call for the addition of the third party.
 | SetupForwarding | Sets up forwarding of calls destined for the specified address on the line, according to the specified forwarding instructions.
Public method | ToString | Overriden. Returns a string that contains the name of the line. (Overrides ObjectToString.)
Public method | Unpark(String) | Retrieves the call parked at the specified phone number or extension.
Public method | Unpark(String, TapiAddress) | Retrieves the call parked at the specified phone number or extension.
Top
See Also

Reference

TapiLine Class


TapiLine.Close Method

TapiLineClose Method
Closes the line. Closing the line stops monitoring of incoming calls on the line.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void Close()
Public Sub Close
public:
void Close()
Remarks
This method closes the line and releases associated telephony hardware. When the line is closed, it cannot be used to place outgoing calls.
See Also

Reference

TapiLine Class
Traysoft.AddTapi Namespace
TapiLineOpen(Boolean, TapiCallHandler)


TapiLine.DeviceSpecific Method

TapiLineDeviceSpecific Method
Overload List
 | Name | Description
Public method | DeviceSpecific(Byte, TapiAddress, TapiCall, Int32) | Provides access to device specific functionality.
 | DeviceSpecific(Object, TapiAddress, TapiCall, Type) | Provides access to device specific functionality.
Top
See Also

Reference

TapiLine Class


TapiLine.DeviceSpecific Method (Byte[], TapiAddress, TapiCall, Int32)

TapiLineDeviceSpecific Method (Byte, TapiAddress, TapiCall, Int32)
Provides access to device specific functionality.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public byte[] DeviceSpecific(
    byte[] inputData,
    TapiAddress address,
    TapiCall call,
    int outputDataSize
)
Public Function DeviceSpecific (
    inputData As Byte(),
    address As TapiAddress,
    call As TapiCall,
    outputDataSize As Integer
) As Byte()
public:
array<unsigned char>^ DeviceSpecific(
    array<unsigned char>^ inputData,
    TapiAddress^ address,
    TapiCall^ call,
    int outputDataSize
)

Parameters

inputData
Type: SystemByte
A byte array that contains input data.
address
Type: Traysoft.AddTapiTapiAddress
An address on the line (if required for the specific function). Set to null reference (Nothing in Visual Basic) if not required.
call
Type: Traysoft.AddTapiTapiCall
A call on the line (if required for the specific function). Set to null reference (Nothing in Visual Basic) if not required.
outputDataSize
Type: SystemInt32
Size of output data, in bytes. Set to zero if specific function does not return any data.

Return Value

Type: Byte
A byte array with output data or null reference (Nothing in Visual Basic) if there is no output data.
Exceptions
Exception | Condition
TapiException | DeviceSpecific failed because of Telephony API (TAPI) error.
Remarks

Many TSPs provide functionality specific to the telephony system using device specific extensions. DeviceSpecific method allows the application to access device specific functions implemented by the TSP. Please refer to the TAPI documentation for the telephony hardware to find out about device specific functionality supported by the telephony service provider.

The application has to negotiate a version of the extension supported by the line device using NegotiateDeviceSpecificExtensionVersion(UInt32, UInt32) before opening the line in order to use DeviceSpecific method.

Note Note
This method should be used when input or output data have variable length. Make sure to specify outputDataLength large enough to hold all output data. Use DeviceSpecific(Object, TapiAddress, TapiCall, Type) when device specific function has fixed size structures as input and output data. Please feel free to contact us and we will gladly help with more complex scenarios.
See Also

Reference

TapiLine Class
DeviceSpecific Overload
Traysoft.AddTapi Namespace
TapiLineNegotiateDeviceSpecificExtensionVersion(UInt32, UInt32)
TapiAppDeviceSpecific


TapiLine.DeviceSpecific Method (Object, TapiAddress, TapiCall, Type)

TapiLineDeviceSpecific Method (Object, TapiAddress, TapiCall, Type)
Provides access to device specific functionality.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public Object DeviceSpecific(
    Object inputStruct,
    TapiAddress address,
    TapiCall call,
    Type outputStructType
)
Public Function DeviceSpecific (
    inputStruct As Object,
    address As TapiAddress,
    call As TapiCall,
    outputStructType As Type
) As Object
public:
Object^ DeviceSpecific(
    Object^ inputStruct,
    TapiAddress^ address,
    TapiCall^ call,
    Type^ outputStructType
)

Parameters

inputStruct
Type: SystemObject
A structure that contains input data.
address
Type: Traysoft.AddTapiTapiAddress
An address on the line (if required for the specific function). Set to null reference (Nothing in Visual Basic) if not required.
call
Type: Traysoft.AddTapiTapiCall
A call on the line (if required for the specific function). Set to null reference (Nothing in Visual Basic) if not required.
outputStructType
Type: SystemType
A type of the structure that will contain output data. Set to null reference (Nothing in Visual Basic) if specific function does not return any data.

Return Value

Type: Object
An object of type outputStructType that contains output data or null reference (Nothing in Visual Basic) if there is no output data.
Exceptions
Exception | Condition
TapiException | DeviceSpecific failed because of Telephony API (TAPI) error.
Remarks

Many TSPs provide functionality specific to the telephony system using device specific extensions. Please refer to the TAPI documentation for the telephony hardware to find out about device specific functionality supported by the telephony service provider.

DeviceSpecific method allows the application to access device specific functions implemented by the TSP. Input and output parameters for device specific functions are usualy described as C structures in TAPI documentation for the telephony hardware. You have to define similar structures/classes in your code and use them to pass input and output parameters to DeviceSpecific method. Please see the code snapshot below for more details.

The application has to negotiate a version of the extension supported by the line device using NegotiateDeviceSpecificExtensionVersion(UInt32, UInt32) before opening the line in order to use DeviceSpecific method.

Note Note
This method should be used when device specific function has fixed size structures as input and output data. Use DeviceSpecific(Byte, TapiAddress, TapiCall, Int32) when input or output data have variable length. Please feel free to contact us and we will gladly help with more complex scenarios.
Examples
The following code shows how to use Cisco device specific function that turns on message waiting light.
C#
VB
C++
Copy
// Define a structure that holds parameters for Cisco MsgWaiting function
struct CiscoLineDevSpecificMsgWaiting
{
    public int MsgType;
    public int BlinkRate;
}
...
// Turn on message waiting light on Cisco phone
CiscoLineDevSpecificMsgWaiting msgWaiting;
msgWaiting.MsgType = SLDST_MSG_WAITING;
msgWaiting.BlinkRate = PHONELAMPMODE_STEADY;
line.DeviceSpecific(msgWaiting, null, null, null);
' Define a structure that holds parameters for Cisco MsgWaiting function
Structure CiscoLineDevSpecificMsgWaiting
    Public MsgType As Integer
    Public BlinkRate As Integer
End Structure
...
' Turn on message waiting light on Cisco phone
Dim msgWaiting As CiscoLineDevSpecificMsgWaiting
msgWaiting.MsgType = SLDST_MSG_WAITING
msgWaiting.BlinkRate = PHONELAMPMODE_STEADY
objLine.DeviceSpecific(msgWaiting, Nothing, Nothing, Nothing)

No code example is currently available or this language may not be supported.

See Also

Reference

TapiLine Class
DeviceSpecific Overload
Traysoft.AddTapi Namespace
TapiLineNegotiateDeviceSpecificExtensionVersion(UInt32, UInt32)
TapiAppDeviceSpecific


TapiLine.DeviceSpecificFeature Method

TapiLineDeviceSpecificFeature Method
Overload List
 | Name | Description
Public method | DeviceSpecificFeature(Byte, UInt32, Int32) | Provides access to device specific features.
 | DeviceSpecificFeature(Object, UInt32, Type) | Provides access to device specific features.
Top
See Also

Reference

TapiLine Class


TapiLine.DeviceSpecificFeature Method (Byte[], UInt32, Int32)

TapiLineDeviceSpecificFeature Method (Byte, UInt32, Int32)
Provides access to device specific features.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public byte[] DeviceSpecificFeature(
    byte[] inputData,
    uint feature,
    int outputDataSize
)
Public Function DeviceSpecificFeature (
    inputData As Byte(),
    feature As UInteger,
    outputDataSize As Integer
) As Byte()
public:
array<unsigned char>^ DeviceSpecificFeature(
    array<unsigned char>^ inputData,
    unsigned int feature,
    int outputDataSize
)

Parameters

inputData
Type: SystemByte
A byte array that contains input data.
feature
Type: SystemUInt32
The parameter value uniquely identifies the feature to invoke on the device.
outputDataSize
Type: SystemInt32
Size of output data, in bytes. Set to zero if specific function does not return any data.

Return Value

Type: Byte
A byte array with output data or null reference (Nothing in Visual Basic) if there is no output data.
Exceptions
Exception | Condition
TapiException | DeviceSpecificFeature failed because of Telephony API (TAPI) error.
Remarks

Many TSPs provide functionality specific to the telephony system using device specific extensions. DeviceSpecificFeature method allows the application to access device specific features implemented by the TSP. Please refer to the TAPI documentation for the telephony hardware to find out about device specific functionality supported by the telephony service provider.

The application has to negotiate a version of the extension supported by the line device using NegotiateDeviceSpecificExtensionVersion(UInt32, UInt32) before opening the line in order to use DeviceSpecificFeature method.

Note Note
This method should be used when input or output data have variable length. Make sure to specify outputDataLength large enough to hold all output data. Use DeviceSpecificFeature(Object, UInt32, Type) when device specific function has fixed size structures as input and output data. Please feel free to contact us and we will gladly help with more complex scenarios.
See Also

Reference

TapiLine Class
DeviceSpecificFeature Overload
Traysoft.AddTapi Namespace
TapiLineNegotiateDeviceSpecificExtensionVersion(UInt32, UInt32)
TapiAppDeviceSpecificFeature


TapiLine.DeviceSpecificFeature Method (Object, UInt32, Type)

TapiLineDeviceSpecificFeature Method (Object, UInt32, Type)
Provides access to device specific features.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public Object DeviceSpecificFeature(
    Object inputStruct,
    uint feature,
    Type outputStructType
)
Public Function DeviceSpecificFeature (
    inputStruct As Object,
    feature As UInteger,
    outputStructType As Type
) As Object
public:
Object^ DeviceSpecificFeature(
    Object^ inputStruct,
    unsigned int feature,
    Type^ outputStructType
)

Parameters

inputStruct
Type: SystemObject
A structure that contains input data.
feature
Type: SystemUInt32
The parameter value uniquely identifies the feature to invoke on the device.
outputStructType
Type: SystemType
A type of the structure that will contain output data. Set to null reference (Nothing in Visual Basic) if specific function does not return any data.

Return Value

Type: Object
An object of type outputStructType that contains output data or null reference (Nothing in Visual Basic) if there is no output data.
Exceptions
Exception | Condition
TapiException | DeviceSpecificFeature failed because of Telephony API (TAPI) error.
Remarks

Many TSPs provide functionality specific to the telephony system using device specific extensions. Please refer to the TAPI documentation for the telephony hardware to find out about device specific functionality supported by the telephony service provider.

DeviceSpecificFeature method allows the application to access device specific features implemented by the TSP. Input and output parameters for device specific functions are usualy described as C structures in TAPI documentation for your telephony hardware. You have to define similar structures/classes in your code and use them to pass input and output parameters to DeviceSpecific method. Please see the code snapshot below for more details.

The application has to negotiate a version of the extension supported by the line device using NegotiateDeviceSpecificExtensionVersion(UInt32, UInt32) before opening the line in order to use DeviceSpecificFeature method.

Note Note
This method should be used when device specific feature has fixed size structures as input and output data. Use DeviceSpecificFeature(Byte, UInt32, Int32) when input or output data have variable length. Please feel free to contact us and we will gladly help with more complex scenarios.
Examples
The following code shows how to use Cisco device specific feature to put Cisco phone into Do Not Disturb mode.
C#
VB
C++
Copy
// Define a structure that holds parameters for Cisco DoNotDisturb feature
struct CCiscoLineDevSpecificFeature_DoNotDisturb
{
    public int MsgType;
    public int Operation;
}
...
// Put Cisco phone into DND mode
CCiscoLineDevSpecificFeature_DoNotDisturb dnd;
dnd.MsgType = 0x1A; // PHONEBUTTONFUNCTION_DONOTDISTURB
dnd.Operation = 1; // DoNotDisturbOperation_ENABLE
line.DeviceSpecificFeature(dnd, 0x1A, null);
' Define a structure that holds parameters for Cisco DoNotDisturb feature
Structure CCiscoLineDevSpecificFeature_DoNotDisturb
    Public MsgType As Integer
    Public Operation As Integer
End Structure
...
' Put Cisco phone into DND mode
Dim dnd As CCiscoLineDevSpecificFeature_DoNotDisturb
dnd.MsgType = &H1A ' PHONEBUTTONFUNCTION_DONOTDISTURB
dnd.Operation = 1 ' DoNotDisturbOperation_ENABLE
objLine.DeviceSpecificFeature(dnd, &H1A, null)

No code example is currently available or this language may not be supported.

See Also

Reference

TapiLine Class
DeviceSpecificFeature Overload
Traysoft.AddTapi Namespace
TapiLineNegotiateDeviceSpecificExtensionVersion(UInt32, UInt32)
TapiAppDeviceSpecificFeature


TapiLine.Dial Method

TapiLineDial Method
Overload List
Name | Description
Dial(String, Boolean) | Dials an outgoing call on the line.
Dial(String, Boolean, TapiMediaMode) | Dials an outgoing call on the line using specified media mode.
Dial(String, Boolean, TapiMediaMode, String) | Dials an outgoing call on the line using specified media mode and originating address.
Dial(String, Boolean, TapiMediaMode, TapiAddress) | Dials an outgoing call on the line using specified media mode and originating TapiAddress.
Top
See Also

Reference

TapiLine Class


TapiLine.Dial Method (String, Boolean)

TapiLineDial Method (String, Boolean)
Dials an outgoing call on the line.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCall Dial(
    string number,
    bool useDialingRules
)
Public Function Dial (
    number As String,
    useDialingRules As Boolean
) As TapiCall
public:
TapiCall^ Dial(
    String^ number,
    bool useDialingRules
)

Parameters

number
Type: SystemString
A string that contains a number to dial.
useDialingRules
Type: SystemBoolean
Indicates if the dialing rules specified in the Control Panel should be applied.

Return Value

Type: TapiCall
A newly created call.
Exceptions
Exception | Condition
TapiException | Dial failed because of Telephony API (TAPI) error.
Remarks

In order to dial an outgoing call, the line must be opened using Open(Boolean, TapiCallHandler) method first. The application can open the line for outgoing calls by passing false as the first parameter of Open(Boolean, TapiCallHandler). Also, outgoing calls can be dialed on the line open for incoming calls.

After an outgoing call is connected, AddTapi.NET fires CallConnected event and executes TapiCallHandler method passed as the second parameter of Open(Boolean, TapiCallHandler). If outgoing call cannot be completed because there is no dailtone, a busy signal was detected or if the called party did not answer within the time interval set in NoAnswerTimeout property, AddTapi.NET fires CallDisconnected event. The application can find out the reason for disconnect by examining the DisconnectMode property of the disconnected call. After CallDisconnected event occurs, another outgoing call can be placed on the same line.

The line must support predictive dialing (also called hardware answer detection) in order for AddTapi.NET to detect if outgoing call was answered. Most voice modems do not support predictive dialing and report that the call is connected immediately after the number has been dialed, before called party picks up the phone. In such case "no answer" is never reported.

When useDialingRules parameter is false, a number to dial is passed directly to the telephony hardware without any translation. In this case the number parameter follows a standard dialable number format. A dialable number can contain the following DTMF or pulse digits: '0'-'9', 'A'-'D', '*' and '#'. A dialable number can also contain the following modifiers (if supported by the telephony hardware):

Modifier | Meaning
! | Hex (21). Indicates that a hookflash (one-half second onhook, followed by one-half second offhook before continuing) is to be inserted in the dial string.
P p | Hex (50) or Hex (70). An uppercase or lowercase P indicates that pulse dialing is to be used for the digits following it.
T t | Hex (54) or Hex (74). An uppercase or lowercase T indicates that tone (DTMF) dialing is to be used for the digits following it.
, | Hex (27). A comma indicates that dialing is to be paused. The duration of a pause is device specific (usually 500 ms). Multiple commas can be used to provide longer pauses.
W w | Hex (57) or Hex (77). An uppercase or lowercase W indicates that dialing should proceed only after a dial tone has been detected.
@ | Hex (40). Indicates that dialing is to "wait for quiet answer" before dialing the remainder of the dialable number. This means to wait for at least one ringback tone followed by several seconds of silence.

When useDialingRules parameter is true, a number to dial is translated using dialing rules specified in the Telephony applet in the Control Panel. In this case the number parameter should follow canonical format. A canonical phone number is a text string with the following structure:

+ CountryCode Space [(AreaCode) Space] SubscriberNumber

Plus sign (hex 2B) indicates that the number that follows it uses the canonical format. The plus sign is followed by the variably sized country code (CountryCode element) without any spaces between the plus sign and the country code. CountryCode is followed by exactly one space character (hex 20). AreaCode is the area code part of the number and is optional. If the area code is present, it must be preceded by exactly one left parenthesis character (hex 28), and be followed by exactly one right parenthesis character (hex 29) and one space character (hex 20). SubscriberNumber may include digits '0' - '9', 'A' - 'D' , '*' and '#'. Other dial control characters described above in the dialable number format are also allowed. The subscriber number should not contain the left parenthesis or right parenthesis character (which are used only to delimit the area code). The following nondigit characters in the subscriber number are allowed: spaces, periods '.' and dashes '-'. They are used for display purposes and are ignored. For example, the canonical representation of the US phone number 555-123-4567 would be:

+1 (555) 123-4567

Examples
The following code shows how to open the line for outgoing calls and make a call. Error handling has been omitted for clarity.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiLine line = TapiApp.Lines[0];
line.Open(false, CallHandler);
line.Dial("15551234567", false);
...

// This method will be called when outgoing call is answered
private void CallHandler(TapiCall call)
{
    call.Play("welcome.wav");
    call.Speak("Press 1 to hear the current time. Press any other button to disconnect.");
    if(call.WaitForDigit(20) == "1")
    {
        call.Speak(DateTime.Now.ToString());
        call.WaitUntilDone(10);
    }
    call.Disconnect();
}
TapiApp.Initialize("MyApp")
Dim objLine As TapiLine
objLine = TapiApp.Lines(0)
objLine.Open(False, AddressOf CallHandler)
objLine.Dial("15551234567", False)
...

' This method will be called when outgoing call is answered
Private Sub CallHandler(ByVal objCall As TapiCall)
    objCall.Play("welcome.wav")
    objCall.Speak("Press 1 to hear the current time. Press any other button to disconnect.")
    If objCall.WaitForDigit(20) = "1" Then
        objCall.Speak(DateTime.Now.ToString())
        objCall.WaitUntilDone(10)
    End If
    objCall.Disconnect()
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiLine Class
Dial Overload
Traysoft.AddTapi Namespace
TapiLineOpen(Boolean, TapiCallHandler)
TapiLineNoAnswerTimeout
Traysoft.AddTapiTapiCall


TapiLine.Dial Method (String, Boolean, TapiMediaMode)

TapiLineDial Method (String, Boolean, TapiMediaMode)
Dials an outgoing call on the line using specified media mode.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCall Dial(
    string number,
    bool useDialingRules,
    TapiMediaMode mediaMode
)
Public Function Dial (
    number As String,
    useDialingRules As Boolean,
    mediaMode As TapiMediaMode
) As TapiCall
public:
TapiCall^ Dial(
    String^ number,
    bool useDialingRules,
    TapiMediaMode mediaMode
)

Parameters

number
Type: SystemString
A string that contains a number to dial.
useDialingRules
Type: SystemBoolean
Indicates if the dialing rules specified in the Control Panel should be applied.
mediaMode
Type: Traysoft.AddTapiTapiMediaMode
Expected media type of the call.

Return Value

Type: TapiCall
A newly created call.
Exceptions
Exception | Condition
TapiException | Dial failed because of Telephony API (TAPI) error.
TapiException | Dial failed because of Telephony API (TAPI) error.
Remarks

In order to dial an outgoing call, the line must be opened using Open(Boolean, TapiCallHandler) method first. The application can open the line for outgoing calls by passing false as the first parameter of Open(Boolean, TapiCallHandler). Also, outgoing calls can be dialed on the line open for incoming calls.

After an outgoing call is connected, AddTapi.NET fires CallConnected event and executes TapiCallHandler method passed as the second parameter of Open(Boolean, TapiCallHandler). If outgoing call cannot be completed because there is no dailtone, a busy signal was detected or if the called party did not answer within the time interval set in NoAnswerTimeout property, AddTapi.NET fires CallDisconnected event. The application can find out the reason for disconnect by examining the DisconnectMode property of the disconnected call. After CallDisconnected event occurs, another outgoing call can be placed on the same line.

The line must support predictive dialing (also called hardware answer detection) in order for AddTapi.NET to detect if outgoing call was answered. Most voice modems do not support predictive dialing and report that the call is connected immediately after the number has been dialed, before called party picks up the phone. In such case "no answer" is never reported.

When useDialingRules parameter is false, a number to dial is passed directly to the telephony hardware without any translation. In this case the number parameter follows a standard dialable number format. A dialable number can contain the following DTMF or pulse digits: '0'-'9', 'A'-'D', '*' and '#'. A dialable number can also contain the following modifiers (if supported by the telephony hardware):

Modifier | Meaning
! | Hex (21). Indicates that a hookflash (one-half second onhook, followed by one-half second offhook before continuing) is to be inserted in the dial string.
P p | Hex (50) or Hex (70). An uppercase or lowercase P indicates that pulse dialing is to be used for the digits following it.
T t | Hex (54) or Hex (74). An uppercase or lowercase T indicates that tone (DTMF) dialing is to be used for the digits following it.
, | Hex (27). A comma indicates that dialing is to be paused. The duration of a pause is device specific (usually 500 ms). Multiple commas can be used to provide longer pauses.
W w | Hex (57) or Hex (77). An uppercase or lowercase W indicates that dialing should proceed only after a dial tone has been detected.
@ | Hex (40). Indicates that dialing is to "wait for quiet answer" before dialing the remainder of the dialable number. This means to wait for at least one ringback tone followed by several seconds of silence.

When useDialingRules parameter is true, a number to dial is translated using dialing rules specified in the Telephony applet in the Control Panel. In this case the number parameter should follow canonical format. A canonical phone number is a text string with the following structure:

+ CountryCode Space [(AreaCode) Space] SubscriberNumber

Plus sign (hex 2B) indicates that the number that follows it uses the canonical format. The plus sign is followed by the variably sized country code (CountryCode element) without any spaces between the plus sign and the country code. CountryCode is followed by exactly one space character (hex 20). AreaCode is the area code part of the number and is optional. If the area code is present, it must be preceded by exactly one left parenthesis character (hex 28), and be followed by exactly one right parenthesis character (hex 29) and one space character (hex 20). SubscriberNumber may include digits '0' - '9', 'A' - 'D' , '*' and '#'. Other dial control characters described above in the dialable number format are also allowed. The subscriber number should not contain the left parenthesis or right parenthesis character (which are used only to delimit the area code). The following nondigit characters in the subscriber number are allowed: spaces, periods '.' and dashes '-'. They are used for display purposes and are ignored. For example, the canonical representation of the US phone number 555-123-4567 would be:

+1 (555) 123-4567

The mediaMode parameter indicates what media type is expected on the call. The application should specify TapiMediaMode.AutomatedVoice media mode in order to use voice functionality such as playing wave files using Play(String) and speaking to the caller using Speak(String).

Examples
The following code shows how to open the line for outgoing calls and make a call. Error handling has been omitted for clarity.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiLine line = TapiApp.Lines[0];
line.Open(false, CallHandler, TapiMediaMode.AutomatedVoice);
line.Dial("15551234567", false, TapiMediaMode.AutomatedVoice);
...

// This method will be called when outgoing call is answered
private void CallHandler(TapiCall call)
{
    call.Play("welcome.wav");
    call.Speak("Press 1 to hear the current time. Press any other button to disconnect.");
    if(call.WaitForDigit(20) == "1")
    {
        call.Speak(DateTime.Now.ToString());
        call.WaitUntilDone(10);
    }
    call.Disconnect();
}
TapiApp.Initialize("MyApp")
Dim objLine As TapiLine
objLine = TapiApp.Lines(0)
objLine.Open(False, AddressOf CallHandler, TapiMediaMode.AutomatedVoice)
objLine.Dial("15551234567", False, TapiMediaMode.AutomatedVoice)
...

' This method will be called when outgoing call is answered
Private Sub CallHandler(ByVal objCall As TapiCall)
    objCall.Play("welcome.wav")
    objCall.Speak("Press 1 to hear the current time. Press any other button to disconnect.")
    If objCall.WaitForDigit(20) = "1" Then
        objCall.Speak(DateTime.Now.ToString())
        objCall.WaitUntilDone(10)
    End If
    objCall.Disconnect()
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiLine Class
Dial Overload
Traysoft.AddTapi Namespace
TapiLineOpen(Boolean, TapiCallHandler)
TapiLineNoAnswerTimeout
Traysoft.AddTapiTapiCall


TapiLine.Dial Method (String, Boolean, TapiMediaMode, String)

TapiLineDial Method (String, Boolean, TapiMediaMode, String)
Dials an outgoing call on the line using specified media mode and originating address.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCall Dial(
    string number,
    bool useDialingRules,
    TapiMediaMode mediaMode,
    string originatingAddress
)
Public Function Dial (
    number As String,
    useDialingRules As Boolean,
    mediaMode As TapiMediaMode,
    originatingAddress As String
) As TapiCall
public:
TapiCall^ Dial(
    String^ number,
    bool useDialingRules,
    TapiMediaMode mediaMode,
    String^ originatingAddress
)

Parameters

number
Type: SystemString
A string that contains a number to dial.
useDialingRules
Type: SystemBoolean
Indicates if the dialing rules specified in the Control Panel should be applied.
mediaMode
Type: Traysoft.AddTapiTapiMediaMode
Expected media type of the call.
originatingAddress
Type: SystemString
Originating address for the call, specified through its phone number.

Return Value

Type: TapiCall
A newly created call.
Exceptions
Exception | Condition
TapiException | Dial failed because of Telephony API (TAPI) error.
TapiException | Dial failed because of Telephony API (TAPI) error.
Remarks

In order to dial an outgoing call, the line must be opened using Open(Boolean, TapiCallHandler) method first. The application can open the line for outgoing calls by passing false as the first parameter of Open(Boolean, TapiCallHandler). Also, outgoing calls can be dialed on the line open for incoming calls.

After an outgoing call is connected, AddTapi.NET fires CallConnected event and executes TapiCallHandler method passed as the second parameter of Open(Boolean, TapiCallHandler). If outgoing call cannot be completed because there is no dailtone, a busy signal was detected or if the called party did not answer within the time interval set in NoAnswerTimeout property, AddTapi.NET fires CallDisconnected event. The application can find out the reason for disconnect by examining the DisconnectMode property of the disconnected call. After CallDisconnected event occurs, another outgoing call can be placed on the same line.

The line must support predictive dialing (also called hardware answer detection) in order for AddTapi.NET to detect if outgoing call was answered. Most voice modems do not support predictive dialing and report that the call is connected immediately after the number has been dialed, before called party picks up the phone. In such case "no answer" is never reported.

When useDialingRules parameter is false, a number to dial is passed directly to the telephony hardware without any translation. In this case the number parameter follows a standard dialable number format. A dialable number can contain the following DTMF or pulse digits: '0'-'9', 'A'-'D', '*' and '#'. A dialable number can also contain the following modifiers (if supported by the telephony hardware):

Modifier | Meaning
! | Hex (21). Indicates that a hookflash (one-half second onhook, followed by one-half second offhook before continuing) is to be inserted in the dial string.
P p | Hex (50) or Hex (70). An uppercase or lowercase P indicates that pulse dialing is to be used for the digits following it.
T t | Hex (54) or Hex (74). An uppercase or lowercase T indicates that tone (DTMF) dialing is to be used for the digits following it.
, | Hex (27). A comma indicates that dialing is to be paused. The duration of a pause is device specific (usually 500 ms). Multiple commas can be used to provide longer pauses.
W w | Hex (57) or Hex (77). An uppercase or lowercase W indicates that dialing should proceed only after a dial tone has been detected.
@ | Hex (40). Indicates that dialing is to "wait for quiet answer" before dialing the remainder of the dialable number. This means to wait for at least one ringback tone followed by several seconds of silence.

When useDialingRules parameter is true, a number to dial is translated using dialing rules specified in the Telephony applet in the Control Panel. In this case the number parameter should follow canonical format. A canonical phone number is a text string with the following structure:

+ CountryCode Space [(AreaCode) Space] SubscriberNumber

Plus sign (hex 2B) indicates that the number that follows it uses the canonical format. The plus sign is followed by the variably sized country code (CountryCode element) without any spaces between the plus sign and the country code. CountryCode is followed by exactly one space character (hex 20). AreaCode is the area code part of the number and is optional. If the area code is present, it must be preceded by exactly one left parenthesis character (hex 28), and be followed by exactly one right parenthesis character (hex 29) and one space character (hex 20). SubscriberNumber may include digits '0' - '9', 'A' - 'D' , '*' and '#'. Other dial control characters described above in the dialable number format are also allowed. The subscriber number should not contain the left parenthesis or right parenthesis character (which are used only to delimit the area code). The following nondigit characters in the subscriber number are allowed: spaces, periods '.' and dashes '-'. They are used for display purposes and are ignored. For example, the canonical representation of the US phone number 555-123-4567 would be:

+1 (555) 123-4567

The mediaMode parameter indicates what media type is expected on the call. The application should specify TapiMediaMode.AutomatedVoice media mode in order to use voice functionality such as playing wave files using Play(String) and speaking to the caller using Speak(String).

The originatingAddress parameter allows to select originating address for lines that have multiple associated addresses. The address is specified through its phone number.

Examples
The following code shows how to open the line for outgoing calls and make a call. Error handling has been omitted for clarity.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiLine line = TapiApp.Lines[0];
line.Open(false, CallHandler, TapiMediaMode.AutomatedVoice);
line.Dial("15551234567", false, TapiMediaMode.AutomatedVoice, "3220");
...

// This method will be called when outgoing call is answered
private void CallHandler(TapiCall call)
{
    call.Play("welcome.wav");
    call.Speak("Press 1 to hear the current time. Press any other button to disconnect.");
    if(call.WaitForDigit(20) == "1")
    {
        call.Speak(DateTime.Now.ToString());
        call.WaitUntilDone(10);
    }
    call.Disconnect();
}
TapiApp.Initialize("MyApp")
Dim objLine As TapiLine
objLine = TapiApp.Lines(0)
objLine.Open(False, AddressOf CallHandler, TapiMediaMode.AutomatedVoice)
objLine.Dial("15551234567", False, TapiMediaMode.AutomatedVoice, "3220")
...

' This method will be called when outgoing call is answered
Private Sub CallHandler(ByVal objCall As TapiCall)
    objCall.Play("welcome.wav")
    objCall.Speak("Press 1 to hear the current time. Press any other button to disconnect.")
    If objCall.WaitForDigit(20) = "1" Then
        objCall.Speak(DateTime.Now.ToString())
        objCall.WaitUntilDone(10)
    End If
    objCall.Disconnect()
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiLine Class
Dial Overload
Traysoft.AddTapi Namespace
TapiLineOpen(Boolean, TapiCallHandler)
TapiLineNoAnswerTimeout
Traysoft.AddTapiTapiCall


TapiLine.Dial Method (String, Boolean, TapiMediaMode, TapiAddress)

TapiLineDial Method (String, Boolean, TapiMediaMode, TapiAddress)
Dials an outgoing call on the line using specified media mode and originating TapiAddress.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCall Dial(
    string number,
    bool useDialingRules,
    TapiMediaMode mediaMode,
    TapiAddress address
)
Public Function Dial (
    number As String,
    useDialingRules As Boolean,
    mediaMode As TapiMediaMode,
    address As TapiAddress
) As TapiCall
public:
TapiCall^ Dial(
    String^ number,
    bool useDialingRules,
    TapiMediaMode mediaMode,
    TapiAddress^ address
)

Parameters

number
Type: SystemString
A string that contains a number to dial.
useDialingRules
Type: SystemBoolean
Indicates if the dialing rules specified in the Control Panel should be applied.
mediaMode
Type: Traysoft.AddTapiTapiMediaMode
Expected media type of the call.
address
Type: Traysoft.AddTapiTapiAddress
Originating address for the call.

Return Value

Type: TapiCall
A newly created call.
Exceptions
Exception | Condition
TapiException | Dial failed because of Telephony API (TAPI) error.
TapiException | Dial failed because of Telephony API (TAPI) error.
Remarks

In order to dial an outgoing call, the line must be opened using Open(Boolean, TapiCallHandler) method first. The application can open the line for outgoing calls by passing false as the first parameter of Open(Boolean, TapiCallHandler). Also, outgoing calls can be dialed on the line open for incoming calls.

After an outgoing call is connected, AddTapi.NET fires CallConnected event and executes TapiCallHandler method passed as the second parameter of Open(Boolean, TapiCallHandler). If outgoing call cannot be completed because there is no dailtone, a busy signal was detected or if the called party did not answer within the time interval set in NoAnswerTimeout property, AddTapi.NET fires CallDisconnected event. The application can find out the reason for disconnect by examining the DisconnectMode property of the disconnected call. After CallDisconnected event occurs, another outgoing call can be placed on the same line.

The line must support predictive dialing (also called hardware answer detection) in order for AddTapi.NET to detect if outgoing call was answered. Most voice modems do not support predictive dialing and report that the call is connected immediately after the number has been dialed, before called party picks up the phone. In such case "no answer" is never reported.

When useDialingRules parameter is false, a number to dial is passed directly to the telephony hardware without any translation. In this case the number parameter follows a standard dialable number format. A dialable number can contain the following DTMF or pulse digits: '0'-'9', 'A'-'D', '*' and '#'. A dialable number can also contain the following modifiers (if supported by the telephony hardware):

Modifier | Meaning
! | Hex (21). Indicates that a hookflash (one-half second onhook, followed by one-half second offhook before continuing) is to be inserted in the dial string.
P p | Hex (50) or Hex (70). An uppercase or lowercase P indicates that pulse dialing is to be used for the digits following it.
T t | Hex (54) or Hex (74). An uppercase or lowercase T indicates that tone (DTMF) dialing is to be used for the digits following it.
, | Hex (27). A comma indicates that dialing is to be paused. The duration of a pause is device specific (usually 500 ms). Multiple commas can be used to provide longer pauses.
W w | Hex (57) or Hex (77). An uppercase or lowercase W indicates that dialing should proceed only after a dial tone has been detected.
@ | Hex (40). Indicates that dialing is to "wait for quiet answer" before dialing the remainder of the dialable number. This means to wait for at least one ringback tone followed by several seconds of silence.

When useDialingRules parameter is true, a number to dial is translated using dialing rules specified in the Telephony applet in the Control Panel. In this case the number parameter should follow canonical format. A canonical phone number is a text string with the following structure:

+ CountryCode Space [(AreaCode) Space] SubscriberNumber

Plus sign (hex 2B) indicates that the number that follows it uses the canonical format. The plus sign is followed by the variably sized country code (CountryCode element) without any spaces between the plus sign and the country code. CountryCode is followed by exactly one space character (hex 20). AreaCode is the area code part of the number and is optional. If the area code is present, it must be preceded by exactly one left parenthesis character (hex 28), and be followed by exactly one right parenthesis character (hex 29) and one space character (hex 20). SubscriberNumber may include digits '0' - '9', 'A' - 'D' , '*' and '#'. Other dial control characters described above in the dialable number format are also allowed. The subscriber number should not contain the left parenthesis or right parenthesis character (which are used only to delimit the area code). The following nondigit characters in the subscriber number are allowed: spaces, periods '.' and dashes '-'. They are used for display purposes and are ignored. For example, the canonical representation of the US phone number 555-123-4567 would be:

+1 (555) 123-4567

The mediaMode parameter indicates what media type is expected on the call. The application should specify TapiMediaMode.AutomatedVoice media mode in order to use voice functionality such as playing wave files using Play(String) and speaking to the caller using Speak(String).

The address parameter allows to select originating address for lines that have multiple associated addresses. This parameter must contain one of the addresses listed in the Addresses collection.

Examples
The following code shows how to open the line for outgoing calls and make a call. Error handling has been omitted for clarity.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiLine line = TapiApp.Lines[0];
line.Open(false, CallHandler, TapiMediaMode.AutomatedVoice);
line.Dial("15551234567", false, TapiMediaMode.AutomatedVoice, line.Addresses[0]);
...

// This method will be called when outgoing call is answered
private void CallHandler(TapiCall call)
{
    call.Play("welcome.wav");
    call.Speak("Press 1 to hear the current time. Press any other button to disconnect.");
    if(call.WaitForDigit(20) == "1")
    {
        call.Speak(DateTime.Now.ToString());
        call.WaitUntilDone(10);
    }
    call.Disconnect();
}
TapiApp.Initialize("MyApp")
Dim objLine As TapiLine
objLine = TapiApp.Lines(0)
objLine.Open(False, AddressOf CallHandler, TapiMediaMode.AutomatedVoice)
objLine.Dial("15551234567", False, TapiMediaMode.AutomatedVoice, objLine.Addresses(0))
...

' This method will be called when outgoing call is answered
Private Sub CallHandler(ByVal objCall As TapiCall)
    objCall.Play("welcome.wav")
    objCall.Speak("Press 1 to hear the current time. Press any other button to disconnect.")
    If objCall.WaitForDigit(20) = "1" Then
        objCall.Speak(DateTime.Now.ToString())
        objCall.WaitUntilDone(10)
    End If
    objCall.Disconnect()
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiLine Class
Dial Overload
Traysoft.AddTapi Namespace
TapiLineOpen(Boolean, TapiCallHandler)
TapiLineNoAnswerTimeout
Traysoft.AddTapiTapiCall


TapiLine.NegotiateDeviceSpecificExtensionVersion Method

TapiLineNegotiateDeviceSpecificExtensionVersion Method
Negotiates a version of the device specific extension to use with the line.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public uint NegotiateDeviceSpecificExtensionVersion(
    uint lowVersion,
    uint highVersion
)
Public Function NegotiateDeviceSpecificExtensionVersion (
    lowVersion As UInteger,
    highVersion As UInteger
) As UInteger
public:
unsigned int NegotiateDeviceSpecificExtensionVersion(
    unsigned int lowVersion,
    unsigned int highVersion
)

Parameters

lowVersion
Type: SystemUInt32
Earliest extension version with which the application is compliant.
highVersion
Type: SystemUInt32
Latest extension version with which the application is compliant.

Return Value

Type: UInt32
The extension version number that was negotiated. If negotiation succeeds, this number is in the range between lowVersion and highVersion.
Exceptions
Exception | Condition
TapiException | NegotiateDeviceSpecificExtensionVersion failed because of Telephony API (TAPI) error.
Remarks

The high-order word is the major version number; the low-order word is the minor version number. For example, version 2.1 is represented as 0x00020001 (hex 20001).

Many TSPs provide functionality specific to the telephony system using device specific extensions. In order to use device specific extension on the line, the application must negotiate a version of the extension using NegotiateDeviceSpecificExtensionVersion before opening the line with Open(Boolean, TapiCallHandler).

Please refer to the TAPI documentation for the telephony hardware to find out about device specific functionality supported by the telephony service provider.

Examples
The following code shows how to negotiate an extension version. Error handling has been omitted for clarity.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiLine line = TapiApp.Lines[0];
TapiDeviceSpecificExtensionID extID = line.DeviceSpecificExtensionID;
if (extID.ID0 == 0x8EBD6A50 && extID.ID1 == 0x138011D2 &&
    extID.ID2 == 0x905B0060 && extID.ID3 == 0xB03DD275)
{
    // This line supports Cisco Unified TSP extension
    // Our application knows how to work with versions 3.0 - 5.0
    // Negotiate to find out which version is supported
    uint ciscoExtVersion = line.NegotiateDeviceSpecificExtensionVersion(0x30000, 0x50000);
    Console.WriteLine("Line {0} supports Cisco extension {1}", line.Name, ciscoExtVersion);
}
line.Open(true, CallHandler);
TapiApp.Initialize("MyApp")
Dim objLine As TapiLine
objLine = TapiApp.Lines(0)
Dim extID As TapiDeviceSpecificExtensionID
extID = objLine.DeviceSpecificExtensionID
If extID.ID0 = &H8EBD6A50 And extID.ID1 = &H138011D2 And \
   extID.ID2 = &H905B0060 And extID.ID3 = &HB03DD275 Then
    ' This line supports Cisco Unified TSP extension
    ' Our application knows how to work with versions 3.0 - 5.0
    ' Negotiate to find out which version is supported
    Dim ciscoExtVersion As UInt32
    ciscoExtVersion = objLine.NegotiateDeviceSpecificExtensionVersion(&H30000, &H50000)
    Console.WriteLine("Line {0} supports Cisco extension {1}", objLine.Name, ciscoExtVersion)
End If
objLine.Open(True, AddressOf CallHandler)

No code example is currently available or this language may not be supported.

See Also

Reference

TapiLine Class
Traysoft.AddTapi Namespace
TapiLineDeviceSpecificExtensionID


TapiLine.Open Method

TapiLineOpen Method
Overload List
Name | Description
Open(Boolean, TapiCallHandler) | Opens the line. After the line is opened, it can be used to monitor incoming calls and/or to place outgoing calls.
Open(Boolean, TapiCallHandler, TapiMediaMode) | Opens the line for calls with selected media types (modes). After the line is opened, it can be used to monitor incoming calls and/or to place outgoing calls.
Open(Boolean, TapiCallHandler, TapiMediaMode, TapiCallPrivilege) | Opens the line for calls with selected media types (modes) and call privileges. After the line is opened, it can be used to monitor incoming calls and/or to place outgoing calls.
Top
See Also

Reference

TapiLine Class


TapiLine.Open Method (Boolean, TapiCallHandler)

TapiLineOpen Method (Boolean, TapiCallHandler)
Opens the line. After the line is opened, it can be used to monitor incoming calls and/or to place outgoing calls.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void Open(
    bool monitorIncomingCalls,
    TapiCallHandler callback
)
Public Sub Open (
    monitorIncomingCalls As Boolean,
    callback As TapiCallHandler
)
public:
void Open(
    bool monitorIncomingCalls,
    TapiCallHandler^ callback
)

Parameters

monitorIncomingCalls
Type: SystemBoolean
Indicates whether the line should monitor incoming calls.
callback
Type: Traysoft.AddTapiTapiCallHandler
Callback method that will be called when a call is connected.
Exceptions
Exception | Condition
TapiException | Open failed because of Telephony API (TAPI) error.
Remarks

The line has to be opened before it can be used to place outgoing calls and receive incoming calls. If the application only makes outgoing calls and does not need to be notified about incoming calls, pass false as the monitorIncomingCalls parameter. AddTapi.NET will monitor incoming calls on the line and fire IncomingCall events if monitorIncomingCalls parameter is true. When monitorIncomingCalls parameter is true, AddTapi.NET will also answer incoming calls if RingsToAnswer is greater than zero.

The callback parameter represents a method in the application that AddTapi.NET will call when a call is connected. This method will be called for all connected calls, incoming and outgoing. This method should perform application-specific call flow processing. Please see TapiCallHandler for more information.

When you use this method, AddTapi.NET automatically selects appropriate media modes based on the capabilities of telephony hardware. Use Open(Boolean, TapiCallHandler, TapiMediaMode) if you want to open the line device for calls with specific media types (modes).

Examples
The following code shows how to open the line to process incoming calls. Error handling has been omitted for clarity.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiLine line = TapiApp.Lines[0];
line.Open(true, CallHandler);
line.RingsToAnswer = 1;
...

// This method will be called when incoming call is answered
private void CallHandler(TapiCall call)
{
    call.Play("welcome.wav");
    call.Speak("Press 1 to hear the current time. Press any other button to disconnect.");
    if(call.WaitForDigit(20) == "1")
    {
        call.Speak(DateTime.Now.ToString());
        call.WaitUntilDone(10);
    }
    call.Disconnect();
}
TapiApp.Initialize("MyApp")
Dim objLine As TapiLine
objLine = TapiApp.Lines(0)
objLine.Open(True, AddressOf CallHandler)
objLine.RingsToAnswer = 1;
...

' This method will be called when incoming call is answered
Private Sub CallHandler(ByVal objCall As TapiCall)
    objCall.Play("welcome.wav")
    objCall.Speak("Press 1 to hear the current time. Press any other button to disconnect.")
    If objCall.WaitForDigit(20) = "1" Then
        objCall.Speak(DateTime.Now.ToString())
        objCall.WaitUntilDone(10)
    End If
    objCall.Disconnect()
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiLine Class
Open Overload
Traysoft.AddTapi Namespace
Traysoft.AddTapiTapiCallHandler
TapiLineClose


TapiLine.Open Method (Boolean, TapiCallHandler, TapiMediaMode)

TapiLineOpen Method (Boolean, TapiCallHandler, TapiMediaMode)
Opens the line for calls with selected media types (modes). After the line is opened, it can be used to monitor incoming calls and/or to place outgoing calls.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void Open(
    bool monitorIncomingCalls,
    TapiCallHandler callback,
    TapiMediaMode mediaModes
)
Public Sub Open (
    monitorIncomingCalls As Boolean,
    callback As TapiCallHandler,
    mediaModes As TapiMediaMode
)
public:
void Open(
    bool monitorIncomingCalls,
    TapiCallHandler^ callback,
    TapiMediaMode mediaModes
)

Parameters

monitorIncomingCalls
Type: SystemBoolean
Indicates whether the line should monitor incoming calls.
callback
Type: Traysoft.AddTapiTapiCallHandler
Callback method that will be called when a call is connected.
mediaModes
Type: Traysoft.AddTapiTapiMediaMode
The media type or modes of interest to the application.
Exceptions
Exception | Condition
TapiException | Open failed because of Telephony API (TAPI) error.
Remarks

The line has to be opened before it can be used to place outgoing calls and receive incoming calls. If the application only makes outgoing calls and does not need to be notified about incoming calls, pass false as the monitorIncomingCalls parameter. AddTapi.NET will monitor incoming calls on the line and fire IncomingCall events if monitorIncomingCalls parameter is true. When monitorIncomingCalls parameter is true, AddTapi.NET will also answer incoming calls if RingsToAnswer is greater than zero.

The callback parameter represents a method in the application that AddTapi.NET will call when a call is connected. This method will be called for all connected calls, incoming and outgoing. This method should perform application-specific call flow processing. Please see TapiCallHandler for more information.

The mediaModes parameter is used to register the application as having an interest in monitoring calls that are of the specified media types. The application can register for multiple media types. The application should include TapiMediaMode.AutomatedVoice media mode if the application wants to use voice functionality such as playing wave files using Play(String) and speaking to the caller using Speak(String). Specifying TapiMediaMode.Unknown media mode indicates that the application wants to control unclassified calls (calls of unknown media type). To obtain a list of media modes supported by the line hardware please use AvailableMediaModes properties.

Examples
The following code shows how to open the line to process incoming calls. Error handling has been omitted for clarity.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiLine line = TapiApp.Lines[0];
line.Open(true, CallHandler, TapiMediaMode.InteractiveVoice | TapiMediaMode.AutomatedVoice );
line.RingsToAnswer = 1;
...

// This method will be called when incoming call is answered
private void CallHandler(TapiCall call)
{
    call.Play("welcome.wav");
    call.Speak("Press 1 to hear the current time. Press any other button to disconnect.");
    if(call.WaitForDigit(20) == "1")
    {
        call.Speak(DateTime.Now.ToString());
        call.WaitUntilDone(10);
    }
    call.Disconnect();
}
TapiApp.Initialize("MyApp")
Dim objLine As TapiLine
objLine = TapiApp.Lines(0)
objLine.Open(True, AddressOf CallHandler, TapiMediaMode.InteractiveVoice Or TapiMediaMode.AutomatedVoice)
objLine.RingsToAnswer = 1;
...

' This method will be called when incoming call is answered
Private Sub CallHandler(ByVal objCall As TapiCall)
    objCall.Play("welcome.wav")
    objCall.Speak("Press 1 to hear the current time. Press any other button to disconnect.")
    If objCall.WaitForDigit(20) = "1" Then
        objCall.Speak(DateTime.Now.ToString())
        objCall.WaitUntilDone(10)
    End If
    objCall.Disconnect()
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiLine Class
Open Overload
Traysoft.AddTapi Namespace
Traysoft.AddTapiTapiCallHandler
TapiLineClose
TapiLineDial(String, Boolean, TapiMediaMode)
TapiLineAvailableMediaModes
TapiLineOpenMediaModes


TapiLine.Open Method (Boolean, TapiCallHandler, TapiMediaMode, TapiCallPrivilege)

TapiLineOpen Method (Boolean, TapiCallHandler, TapiMediaMode, TapiCallPrivilege)
Opens the line for calls with selected media types (modes) and call privileges. After the line is opened, it can be used to monitor incoming calls and/or to place outgoing calls.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public void Open(
    bool monitorIncomingCalls,
    TapiCallHandler callback,
    TapiMediaMode mediaModes,
    TapiCallPrivilege privilege
)
Public Sub Open (
    monitorIncomingCalls As Boolean,
    callback As TapiCallHandler,
    mediaModes As TapiMediaMode,
    privilege As TapiCallPrivilege
)
public:
void Open(
    bool monitorIncomingCalls,
    TapiCallHandler^ callback,
    TapiMediaMode mediaModes,
    TapiCallPrivilege privilege
)

Parameters

monitorIncomingCalls
Type: SystemBoolean
Indicates whether the line should monitor incoming calls.
callback
Type: Traysoft.AddTapiTapiCallHandler
Callback method that will be called when a call is connected.
mediaModes
Type: Traysoft.AddTapiTapiMediaMode
The media type or modes of interest to the application.
privilege
Type: Traysoft.AddTapiTapiCallPrivilege
The rights or privileges the application wants when notified of a call.
Exceptions
Exception | Condition
TapiException | Open failed because of Telephony API (TAPI) error.
Remarks

The line has to be opened before it can be used to place outgoing calls and receive incoming calls. If the application only makes outgoing calls and does not need to be notified about incoming calls, pass false as the monitorIncomingCalls parameter. AddTapi.NET will monitor incoming calls on the line and fire IncomingCall events if monitorIncomingCalls parameter is true. When monitorIncomingCalls parameter is true, AddTapi.NET will also answer incoming calls if RingsToAnswer is greater than zero.

The callback parameter represents a method in the application that AddTapi.NET will call when a call is connected. This method will be called for all connected calls, incoming and outgoing. This method should perform application-specific call flow processing. Please see TapiCallHandler for more information.

The mediaModes parameter is used to register the application as having an interest in monitoring calls that are of the specified media types. The application can register for multiple media types. The application should include TapiMediaMode.AutomatedVoice media mode if the application wants to use voice functionality such as playing wave files using Play(String) and speaking to the caller using Speak(String). Specifying TapiMediaMode.Unknown media mode indicates that the application wants to control unclassified calls (calls of unknown media type). To obtain a list of media modes supported by the line hardware please use AvailableMediaModes properties.

Examples
The following code shows how to open the line to process incoming calls. Error handling has been omitted for clarity.
C#
VB
C++
Copy
TapiApp.Initialize("MyApp");
TapiLine line = TapiApp.Lines[0];
line.Open(true, CallHandler, TapiMediaMode.InteractiveVoice | TapiMediaMode.AutomatedVoice );
line.RingsToAnswer = 1;
...

// This method will be called when incoming call is answered
private void CallHandler(TapiCall call)
{
    call.Play("welcome.wav");
    call.Speak("Press 1 to hear the current time. Press any other button to disconnect.");
    if(call.WaitForDigit(20) == "1")
    {
        call.Speak(DateTime.Now.ToString());
        call.WaitUntilDone(10);
    }
    call.Disconnect();
}
TapiApp.Initialize("MyApp")
Dim objLine As TapiLine
objLine = TapiApp.Lines(0)
objLine.Open(True, AddressOf CallHandler, TapiMediaMode.InteractiveVoice Or TapiMediaMode.AutomatedVoice)
objLine.RingsToAnswer = 1;
...

' This method will be called when incoming call is answered
Private Sub CallHandler(ByVal objCall As TapiCall)
    objCall.Play("welcome.wav")
    objCall.Speak("Press 1 to hear the current time. Press any other button to disconnect.")
    If objCall.WaitForDigit(20) = "1" Then
        objCall.Speak(DateTime.Now.ToString())
        objCall.WaitUntilDone(10)
    End If
    objCall.Disconnect()
End Sub

No code example is currently available or this language may not be supported.

See Also

Reference

TapiLine Class
Open Overload
Traysoft.AddTapi Namespace
Traysoft.AddTapiTapiCallHandler
TapiLineClose
TapiLineDial(String, Boolean, TapiMediaMode)
TapiLineAvailableMediaModes
TapiLineOpenMediaModes


TapiLine.Pickup Method

TapiLinePickup Method
Overload List
 | Name | Description
Public method | Pickup(String, String) | Picks up a call ringing at the specified phone number or extension.
Public method | Pickup(String, String, TapiAddress) | Picks up a call ringing at the specified phone number or extension.
Top
See Also

Reference

TapiLine Class


TapiLine.Pickup Method (String, String)

TapiLinePickup Method (String, String)
Picks up a call ringing at the specified phone number or extension.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCall Pickup(
    string number,
    string group
)
Public Function Pickup (
    number As String,
    group As String
) As TapiCall
public:
TapiCall^ Pickup(
    String^ number,
    String^ group
)

Parameters

number
Type: SystemString
Number/extension whose call is to be picked up.
group
Type: SystemString
Group identifier to which the ringing station belongs. This parameter is required on some switches to pick up calls outside of the current pickup group.

Return Value

Type: TapiCall
A TapiCall object representing picked up call.
Exceptions
Exception | Condition
TapiException | The call was not picked up because a TAPI error occurred.
Remarks

For most telephony configurations group parameter can be null (Nothing in Visual Basic) and the application has to provide only number parameter. If supported by the telephony hardware, group parameter can be specified by itself with a null (Nothing in Visual Basic) for the number parameter to perform a group pick up.

When a call has been picked up successfully, the application is notified by the CallState event about call state changes.

If TapiAddress.SupportsPickupCallWaiting is true, Pickup can be used to pick up a call for which the user has audibly detected the call-waiting signal but for which the provider is unable to perform the detection. This gives the user a mechanism to "answer" a waiting call even though the service provider was unable to detect the call-waiting signal. Both number and group parameters must be null (Nothing in Visual Basic) to pick up a call-waiting call. After Pickup has been used to pick up the second call, SwapHold(TapiCall) can be used to toggle between them.

See Also

Reference

TapiLine Class
Pickup Overload


TapiLine.Pickup Method (String, String, TapiAddress)

TapiLinePickup Method (String, String, TapiAddress)
Picks up a call ringing at the specified phone number or extension.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCall Pickup(
    string number,
    string group,
    TapiAddress address
)
Public Function Pickup (
    number As String,
    group As String,
    address As TapiAddress
) As TapiCall
public:
TapiCall^ Pickup(
    String^ number,
    String^ group,
    TapiAddress^ address
)

Parameters

number
Type: SystemString
Number/extension whose call is to be picked up.
group
Type: SystemString
Group identifier to which the ringing station belongs. This parameter is required on some switches to pick up calls outside of the current pickup group.
address
Type: Traysoft.AddTapiTapiAddress
Address on the line at which the pickup is to be originated.

Return Value

Type: TapiCall
A TapiCall object representing picked up call.
Exceptions
Exception | Condition
TapiException | The call was not picked up because a TAPI error occurred.
Remarks

For most telephony configurations group parameter can be null (Nothing in Visual Basic) and the application has to provide only number parameter. If supported by the telephony hardware, group parameter can be specified by itself with a null (Nothing in Visual Basic) for the number parameter to perform a group pick up.

When a call has been picked up successfully, the application is notified by the CallState event about call state changes.

If TapiAddress.SupportsPickupCallWaiting is true, Pickup can be used to pick up a call for which the user has audibly detected the call-waiting signal but for which the provider is unable to perform the detection. This gives the user a mechanism to "answer" a waiting call even though the service provider was unable to detect the call-waiting signal. Both number and group parameters must be null (Nothing in Visual Basic) to pick up a call-waiting call. After Pickup has been used to pick up the second call, SwapHold(TapiCall) can be used to toggle between them.

See Also

Reference

TapiLine Class
Pickup Overload


TapiLine.SetupConference Method

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: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCall SetupConference(
    TapiCall initialCall,
    out TapiCall consultationCall,
    int numParties
)
Public Function SetupConference (
    initialCall As TapiCall,
    <OutAttribute> ByRef consultationCall As TapiCall,
    numParties As Integer
) As TapiCall
public:
TapiCall^ SetupConference(
    TapiCall^ initialCall,
    [OutAttribute] 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
Exception | Condition
TapiException | The 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.
C#
VB
C++
Copy
// 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);
' 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
Dim conferenceCall as TapiCall
Dim consultationCall as TapiCall
conferenceCall = activeCall.Line.SetupConference(activeCall, consultationCall, 3)
System.Threading.Thread.Sleep(500)
If consultationCall.State = TapiCallState.DialTone Then
  consultationCall.Dial("201")
Else
  ' Error, consultation call is not in dialtone state
EndIf
' 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)

No code example is currently available or this language may not be supported.

See Also

Reference

TapiLine Class
Traysoft.AddTapi Namespace
TapiCallPrepareAddToConference
TapiCallAddToConference(TapiCall)
TapiCallRemoveFromConference


TapiLine.SetupForwarding Method

TapiLineSetupForwarding Method
Sets up forwarding of calls destined for the specified address on the line, according to the specified forwarding instructions.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCall SetupForwarding(
    IEnumerable<TapiForwardEntry> forwardingInstructions,
    int numRingsNoAnswer,
    TapiAddress address
)
Public Function SetupForwarding (
    forwardingInstructions As IEnumerable(Of TapiForwardEntry),
    numRingsNoAnswer As Integer,
    address As TapiAddress
) As TapiCall
public:
TapiCall^ SetupForwarding(
    IEnumerable<TapiForwardEntry^>^ forwardingInstructions,
    int numRingsNoAnswer,
    TapiAddress^ address
)

Parameters

forwardingInstructions
Type: System.Collections.GenericIEnumerable TapiForwardEntry
An array of TapiForwardEntry objects that describes the specific forwarding instructions.
numRingsNoAnswer
Type: SystemInt32
Number of rings before a call is considered a "no answer."
address
Type: Traysoft.AddTapiTapiAddress
Address on the specified line whose incoming calls are to be forwarded. To configure call forwarding for all originating addresses on the line, set this parameter to null (Nothing in Visual Basic).

Return Value

Type: TapiCall
A TapiCall object representing a consultation call to the forwarding destination. Most switches do not create a consultation call when setting up call forwarding. SetupForwarding returns null (Nothing in Visual Basic) if consultation call was not created.
Remarks

When an originating address (address parameter) or all addresses on the line are forwarded, the specified incoming calls are deflected to the other number by the switch. This method provides a combination of forward and do-not-disturb features. This method can also cancel forwarding currently in effect.

Forwarding of the address(es) remains in effect until SetupForwarding is called again. The most recent forwarding list replaces the old one. Forwarding can be canceled by specifying null (Nothing in Visual Basic) as the forwardingInstructions parameter. If a null destination address is specified for an entry in the forwarding list, the operation acts as a do-not-disturb.

Forwarding status of an address can also be affected externally; for example, by administrative actions at the switch or by a user from another station. It may not be possible for the TSP to be aware of this state change, and it may not be able to keep in synchronization with the forwarding state known to the switch.

Examples
The following code shows how to set up call forwarding. Error handling has been omitted for clarity.
C#
VB
C++
Copy
TapiForwardEntry[] forward = new TapiForwardEntry[2];
forward[0] = new TapiForwardEntry(TapiForwardMode.Busy, "5551234567", null);
forward[1] = new TapiForwardEntry(TapiForwardMode.NoAnswer, "101", null);
TapiCall consultationCall = line.SetupForwarding(forward, 5, null);
// We do not need the consultationCall
if (consultationCall != null) consultationCall.Disconnect();
Dim forward As TapiForwardEntry() = New TapiForwardEntry(2) {}
forward(0) = New TapiForwardEntry(TapiForwardMode.Busy, "5551234567", Nothing)
forward(1) = New TapiForwardEntry(TapiForwardMode.NoAnswer, "101", Nothing)
Dim consultationCall As TapiCall
consultationCall = line.SetupForwarding(forward, 5, Nothing)
' We do not need the consultationCall
If consultationCall Is Not Nothing Then
  consultationCall.Disconnect()
End If

No code example is currently available or this language may not be supported.

See Also

Reference

TapiLine Class
Traysoft.AddTapi Namespace
TapiAddressGetForwardingInfo


TapiLine.ToString Method

TapiLineToString Method
Overriden. Returns a string that contains the name of the line.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public override string ToString()
Public Overrides Function ToString As String
public:
virtual String^ ToString() override

Return Value

Type: String
A string that contains the name of the line.
See Also

Reference

TapiLine Class


TapiLine.Unpark Method

TapiLineUnpark Method
Overload List
 | Name | Description
Public method | Unpark(String) | Retrieves the call parked at the specified phone number or extension.
Public method | Unpark(String, TapiAddress) | Retrieves the call parked at the specified phone number or extension.
Top
See Also

Reference

TapiLine Class


TapiLine.Unpark Method (String)

TapiLineUnpark Method (String)
Retrieves the call parked at the specified phone number or extension.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCall Unpark(
    string number
)
Public Function Unpark (
    number As String
) As TapiCall
public:
TapiCall^ Unpark(
    String^ number
)

Parameters

number
Type: SystemString
Number where the call is parked.

Return Value

Type: TapiCall
A TapiCall object representing unparked call.
Exceptions
Exception | Condition
TapiException | The call was not unparked because a TAPI error occurred.
Remarks

The parked call typically enters the idle state after it has been successfully parked and the corresponding TapiCall object is released. When the application performs an Unpark on the parked call, a new TapiCall object is created for the unparked call.

See Also

Reference

TapiLine Class
Unpark Overload
Traysoft.AddTapi Namespace
TapiCallPark(String)


TapiLine.Unpark Method (String, TapiAddress)

TapiLineUnpark Method (String, TapiAddress)
Retrieves the call parked at the specified phone number or extension.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiCall Unpark(
    string number,
    TapiAddress address
)
Public Function Unpark (
    number As String,
    address As TapiAddress
) As TapiCall
public:
TapiCall^ Unpark(
    String^ number,
    TapiAddress^ address
)

Parameters

number
Type: SystemString
Number where the call is parked.
address
Type: Traysoft.AddTapiTapiAddress
Address on the line at which the unpark is to be originated.

Return Value

Type: TapiCall
A TapiCall object representing unparked call.
Exceptions
Exception | Condition
TapiException | The call was not unparked because a TAPI error occurred.
Remarks

The parked call typically enters the idle state after it has been successfully parked and the corresponding TapiCall object is released. When the application performs an Unpark on the parked call, a new TapiCall object is created for the unparked call.

See Also

Reference

TapiLine Class
Unpark Overload
Traysoft.AddTapi Namespace
TapiCallPark(String)


TapiLineDeviceState Enumeration

TapiLineDeviceState Enumeration
Describes various device state changes in the LineDeviceState event.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
[FlagsAttribute]
public enum TapiLineDeviceState
<FlagsAttribute>
Public Enumeration TapiLineDeviceState
[FlagsAttribute]
public enum class TapiLineDeviceState
Members
Member name | Value | Description
Ringing | 2 | The ring signal is detected on the line. The application is notified on each ring cycle by repeated LineDeviceState events with the Ringing flag set.
Connected | 4 | The line was previously disconnected and is now connected to TAPI.
Disconnected | 8 | This line was previously connected and is now disconnected from TAPI.
MsgWaitOn | 16 | The message waiting indicator is turned on.
MsgWaitOff | 32 | The message waiting indicator is turned off.
InService | 64 | The line is connected to TAPI. This happens when TAPI is first activated or when the line wire is physically plugged in and in-service at the switch while TAPI is active.
OutOfService | 128 | The line is out of service at the switch or physically disconnected. TAPI cannot be used to operate on the line device.
Maintenance | 256 | Maintenance is being performed on the line at the switch. TAPI cannot be used to operate on the line device.
Open | 512 | The line has been opened by another application.
Close | 1024 | The line has been closed by another application.
NumCalls | 2048 | The number of calls on the line device has changed.
DeviceSpecific | 131072 | The line's device-specific information has changed. The application should check DeviceSpecificInfo for updated information.
All | 133118 | A mask that includes all line device states.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiLineDeviceStateEventArgs Class

TapiLineDeviceStateEventArgs Class
Provides data for the LineDeviceState event.
Inheritance Hierarchy
SystemObject
SystemEventArgs
Traysoft.AddTapiTapiEventArgs
Traysoft.AddTapiTapiLineDeviceStateEventArgs

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public class TapiLineDeviceStateEventArgs : TapiEventArgs
Public Class TapiLineDeviceStateEventArgs
    Inherits TapiEventArgs
public ref class TapiLineDeviceStateEventArgs : public TapiEventArgs

The TapiLineDeviceStateEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | LineDeviceState | Gets the device state changes. Can be one or more of the TapiLineDeviceState flags.
Top
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiLineDeviceStateEventArgs Properties

TapiLineDeviceStateEventArgs Properties

The TapiLineDeviceStateEventArgs type exposes the following members.

Properties
 | Name | Description
Public property | LineDeviceState | Gets the device state changes. Can be one or more of the TapiLineDeviceState flags.
Top
See Also

Reference

TapiLineDeviceStateEventArgs Class


TapiLineDeviceStateEventArgs.LineDeviceState Property

TapiLineDeviceStateEventArgsLineDeviceState Property
Gets the device state changes. Can be one or more of the TapiLineDeviceState flags.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public TapiLineDeviceState LineDeviceState { get; }
Public ReadOnly Property LineDeviceState As TapiLineDeviceState
    Get
public:
property TapiLineDeviceState LineDeviceState {
    TapiLineDeviceState get ();
}

Property Value

Type: TapiLineDeviceState
See Also

Reference

TapiLineDeviceStateEventArgs Class


TapiLineDeviceStateEventHandler Delegate

TapiLineDeviceStateEventHandler Delegate
Represents the method that will handle LineDeviceState event.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public delegate void TapiLineDeviceStateEventHandler(
    Object sender,
    TapiLineDeviceStateEventArgs args
)
Public Delegate Sub TapiLineDeviceStateEventHandler (
    sender As Object,
    args As TapiLineDeviceStateEventArgs
)
public delegate void TapiLineDeviceStateEventHandler(
    Object^ sender,
    TapiLineDeviceStateEventArgs^ args
)

Parameters

sender
Type: SystemObject
The source of the event (currently not used by AddTapi.NET).
args
Type: Traysoft.AddTapiTapiLineDeviceStateEventArgs
An TapiLineDeviceStateEventArgs that contains event data.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiLineDeviceStatus Class

TapiLineDeviceStatus Class
Represents current status of a line device.
Inheritance Hierarchy
SystemObject
Traysoft.AddTapiTapiLineDeviceStatus

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public class TapiLineDeviceStatus
Public Class TapiLineDeviceStatus
public ref class TapiLineDeviceStatus

The TapiLineDeviceStatus type exposes the following members.

Properties
 | Name | Description
Public property | DeviceSpecificInfo | Gets device specific information about the status of a line device.
Public property | IsConnected | Specifies whether the line is connected to TAPI.
Public property | IsInService | Indicates whether the line is in service.
Public property | IsMsgWaitOn | Indicates whether the line has a message waiting (message light is on).
Public property | NumActiveCalls | Number of calls on the line in call states other than Idle, OnHold, OnHoldPendingTransfer, and OnHoldPendingConference.
Public property | NumOnHoldCalls | Number of calls on the line in the OnHold state.
Public property | NumOnHoldPendingCalls | Number of calls on the line in the OnHoldPendingTransfer or OnHoldPendingConference state.
Top
See Also

Reference

Traysoft.AddTapi Namespace
TapiLineDeviceStatus


TapiLineDeviceStatus Properties

TapiLineDeviceStatus Properties

The TapiLineDeviceStatus type exposes the following members.

Properties
 | Name | Description
Public property | DeviceSpecificInfo | Gets device specific information about the status of a line device.
Public property | IsConnected | Specifies whether the line is connected to TAPI.
Public property | IsInService | Indicates whether the line is in service.
Public property | IsMsgWaitOn | Indicates whether the line has a message waiting (message light is on).
Public property | NumActiveCalls | Number of calls on the line in call states other than Idle, OnHold, OnHoldPendingTransfer, and OnHoldPendingConference.
Public property | NumOnHoldCalls | Number of calls on the line in the OnHold state.
Public property | NumOnHoldPendingCalls | Number of calls on the line in the OnHoldPendingTransfer or OnHoldPendingConference state.
Top
See Also

Reference

TapiLineDeviceStatus Class


TapiLineDeviceStatus.DeviceSpecificInfo Property

TapiLineDeviceStatusDeviceSpecificInfo Property
Gets device specific information about the status of a line device.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public byte[] DeviceSpecificInfo { get; }
Public ReadOnly Property DeviceSpecificInfo As Byte()
    Get
public:
property array<unsigned char>^ DeviceSpecificInfo {
    array<unsigned char>^ get ();
}

Property Value

Type: Byte
Remarks

Many TSPs provide functionality specific to the telephony system using device specific extensions. Please refer to the TAPI documentation for the telephony hardware to find out about device specific functionality supported by the telephony service provider.

DeviceSpecificInfo property allows the application to retrieve device specific portion of the line device status. The information provided in DeviceSpecificInfo property is described in TAPI documentation for the telephony hardware.

The application has to negotiate a version of the extension supported by the line device using NegotiateDeviceSpecificExtensionVersion(UInt32, UInt32) before opening the line in order to use device specific functionality.

Avaya IP Office system uses this property to provide additional information about the line/extension, including call forwarding/DND information, number of read/new voicemail messages, user login information and more. Please contact us for a code sample that shows how to use this feature of the Avaya IP Office phone system.

See Also

Reference

TapiLineDeviceStatus Class
Traysoft.AddTapi Namespace
TapiLineNegotiateDeviceSpecificExtensionVersion(UInt32, UInt32)
TapiLineDeviceSpecific(Object, TapiAddress, TapiCall, Type)


TapiLineDeviceStatus.IsConnected Property

TapiLineDeviceStatusIsConnected Property
Specifies whether the line is connected to TAPI.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public bool IsConnected { get; }
Public ReadOnly Property IsConnected As Boolean
    Get
public:
property bool IsConnected {
    bool get ();
}

Property Value

Type: Boolean
See Also

Reference

TapiLineDeviceStatus Class


TapiLineDeviceStatus.IsInService Property

TapiLineDeviceStatusIsInService Property
Indicates whether the line is in service.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public bool IsInService { get; }
Public ReadOnly Property IsInService As Boolean
    Get
public:
property bool IsInService {
    bool get ();
}

Property Value

Type: Boolean
See Also

Reference

TapiLineDeviceStatus Class


TapiLineDeviceStatus.IsMsgWaitOn Property

TapiLineDeviceStatusIsMsgWaitOn Property
Indicates whether the line has a message waiting (message light is on).

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public bool IsMsgWaitOn { get; }
Public ReadOnly Property IsMsgWaitOn As Boolean
    Get
public:
property bool IsMsgWaitOn {
    bool get ();
}

Property Value

Type: Boolean
See Also

Reference

TapiLineDeviceStatus Class


TapiLineDeviceStatus.NumActiveCalls Property

TapiLineDeviceStatusNumActiveCalls Property
Number of calls on the line in call states other than Idle, OnHold, OnHoldPendingTransfer, and OnHoldPendingConference.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public int NumActiveCalls { get; }
Public ReadOnly Property NumActiveCalls As Integer
    Get
public:
property int NumActiveCalls {
    int get ();
}

Property Value

Type: Int32
See Also

Reference

TapiLineDeviceStatus Class


TapiLineDeviceStatus.NumOnHoldCalls Property

TapiLineDeviceStatusNumOnHoldCalls Property
Number of calls on the line in the OnHold state.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public int NumOnHoldCalls { get; }
Public ReadOnly Property NumOnHoldCalls As Integer
    Get
public:
property int NumOnHoldCalls {
    int get ();
}

Property Value

Type: Int32
See Also

Reference

TapiLineDeviceStatus Class


TapiLineDeviceStatus.NumOnHoldPendingCalls Property

TapiLineDeviceStatusNumOnHoldPendingCalls Property
Number of calls on the line in the OnHoldPendingTransfer or OnHoldPendingConference state.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public int NumOnHoldPendingCalls { get; }
Public ReadOnly Property NumOnHoldPendingCalls As Integer
    Get
public:
property int NumOnHoldPendingCalls {
    int get ();
}

Property Value

Type: Int32
See Also

Reference

TapiLineDeviceStatus Class


TapiMediaMode Enumeration

TapiMediaMode Enumeration
Describes media types (or modes) of a call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
[FlagsAttribute]
public enum TapiMediaMode
<FlagsAttribute>
Public Enumeration TapiMediaMode
[FlagsAttribute]
public enum class TapiMediaMode
Members
Member name | Value | Description
Default | 0 | AddTapi.NET will select media mode based on capabilities of telephony hardware.
Unknown | 2 | Media mode is not currently known and may become known later.
InteractiveVoice | 4 | A voice call, and the call is handled as an interactive voice call with humans on both ends.
AutomatedVoice | 8 | A voice call, and the call is locally handled by an automated application.
DataModem | 16 | A data modem session on the call.
All | 30 | A mask that includes all media modes.
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiVoice Class

TapiVoice Class
Represents a text-to-speech voice available on the computer.
Inheritance Hierarchy
SystemObject
Traysoft.AddTapiTapiVoice

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public class TapiVoice
Public Class TapiVoice
public ref class TapiVoice

The TapiVoice type exposes the following members.

Properties
 | Name | Description
Public property | Name | Gets the name of the voice.
Top
Methods
 | Name | Description
Public method | ToString | Overriden. Returns a string that contains the name of the voice. (Overrides ObjectToString.)
Top
See Also

Reference

Traysoft.AddTapi Namespace

Copyright (c) 2008-2018 Traysoft Inc. All rights reserved.


TapiVoice Properties

TapiVoice Properties

The TapiVoice type exposes the following members.

Properties
 | Name | Description
Public property | Name | Gets the name of the voice.
Top
See Also

Reference

TapiVoice Class


TapiVoice.Name Property

TapiVoiceName Property
Gets the name of the voice.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public string Name { get; }
Public ReadOnly Property Name As String
    Get
public:
property String^ Name {
    String^ get ();
}

Property Value

Type: String
See Also

Reference

TapiVoice Class


TapiVoice Methods

TapiVoice Methods

The TapiVoice type exposes the following members.

Methods
 | Name | Description
Public method | ToString | Overriden. Returns a string that contains the name of the voice. (Overrides ObjectToString.)
Top
See Also

Reference

TapiVoice Class


TapiVoice.ToString Method

TapiVoiceToString Method
Overriden. Returns a string that contains the name of the voice.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 5.3.1.1108
Syntax
C#
VB
C++
Copy
public override string ToString()
Public Overrides Function ToString As String
public:
virtual String^ ToString() override

Return Value

Type: String
A string that contains the name of the voice.
See Also

Reference

TapiVoice Class