Questions tagged [jtapi]

The Java Telephony API (JTAPI) supports telephony call control. It is an extensible application programming interface (API) designed to scale for use in a range of domains, from first-party call control in a consumer device to third-party call control in large distributed call centers.

Overview

JTAPI (Java Telephony Application Programming Interface) is a Java-based application programming interface (API) for computer telephony applications. JTAPI consists of a set of language packages. The core package provides the basic framework for simple telephony processes such as placing a call, answering a call, and dropping a call. Several extension packages provide additional telephony features. JTAPI is interoperable across various computer platforms. JTAPI is similar to Microsoft and Intel's Telephony Application Programming Interface (TAPI).

JTAPI was developed in 1996 by a working group of computer and telecommunications companies including Intel, Lucent, NortelNetworks, Novell, and Sun Microsystems.

Basic JTapi elements
Telephony applications, involve in the control or monitor of objects a telephone system exposes. Such objects could be logical objects, for example an Address, a Call, a Connection etc, or physical objects as a Terminal. Following is a list with the most important JTAPI objects that will be covered throughout this article series. This is an attempt to give an introduction so for everyone to be on the same page.

JTapiPeer
Provider
Address
Terminal
    Address and Terminal objects
Call
    Address and Call objects
    Terminal and Call objects
Connection

JTapiPeer
The JtapiPeer interface represents a vendor's particular implementation of the Java Telephony API. JtapiPeer is the first object an application must instantiate. Depending on the vendor's implementation of this interface, one or more different services can be obtained by the JtapiPeer object.

Provider
A Provider represents the telephony software-entity that interfaces with a telephony subsystem. A Provider is created and returned by the JtapiPeer.getProvider() method which is given a string to describe the desired Provider. This method sets up any needed communication paths between the application and the Provider. The string given is one of the services listed in the JtapiPeer.getServices(). The rest of the JTAPI objects are derived from the provider and also the provider is responsible for the various actions the application is designed to make with the JTapi. For example, provider is will deliver Address events in case we monitor an Address or create a call between a local Address and a remote Address (example of an outgoing call). Important to notice is the term Provider's domain which refers to the collection of Address and Terminal objects which are local to the Provider, and typically, can be controlled by the Provider. For example,the domain of a Provider for a PBX may be the Addresses and Terminals in that PBX. The Provider implementation controls access to Addresses and Terminals by limiting the domain it presents to the application.

Address
An Address object represents what we commonly think of as a "telephone number". The purpose of the address could be something different than a telephone number if the underlying network is not a telephone network. As an example if the underlying network is an IP network; then the address might represent an IP address (e.g. 192.168.0.100). When the Address object is created, a unique string name is assigned to it (e.g. 15121) and does not change throughout the lifetime of the object. The method Address.getName() returns the name of the Address object. Address objects may be classified into two categories: local and remote. Local Address objects are those addresses which are part of the local telephone system domain, for example the extension numbers of a PBX. These Address objects are created by the implementation of the Provider object when it is first instantiated. All of the Provider's local addresses are reported via the Provider.getAddresses() method. Remote Address objects are those outside of the Provider's domain which the Provider learns about during its lifetime through various happenings (e.g. an incoming call from a currently unknown address). Remote Addresses are not reported via the Provider.getAddresses() method. Note that applications never explicitly create new Address objects.

Terminal
A Terminal represents a physical hardware endpoint connected to the telephony domain. In other words, a Terminal is the telephone set of a PBX. When the Terminal object is created, a unique string name is assigned to it and does not change throughout the lifetime of the object. The method Terminal.getTerminals() returns the name of the Terminal. Important to notice here is that in contrary with the Address name, the name of the Terminal may not have any real-world interpretation since in order to interact with a Terminal (e.g. call a Terminal) we use the Address assigned to this Terminal. Terminal objects may be classified into two categories: local and remote. Local Terminal objects are those terminals which are part of the local telephone system domain, for example the telephone sets of a PBX. These Terminal objects are created by the implementation of the Provider object when it is first instantiated. All of the Provider's local terminals are reported via the Provider.getTerminals() method. Remote Terminal objects are those outside of the Provider's domain which the Provider learns about during its lifetime through various happenings (e.g. an incoming call from a currently unknown address). Remote Terminal objects are not reported via the Provider.getTerminals() method. Note that applications never explicitly create new Terminal objects. Address and Terminal objects Address and Terminal objects exist in a many-to-many relationship. An Address object may have zero or more Terminals associated with it. For each Terminal associated with an Address, that Terminal must also reflect its association with the Address. Since the implementation creates Address (and Terminal) objects, it is responsible for insuring the correctness of these relationships. The Terminals associated with an Address is given by the Address.getTerminals() method and the Addresses associated with a Terminal is given by the Terminal.getAddresses(). An association between an Address and Terminal object indicates that the Terminal contains the Address object as one of its telephone number addresses. In many instances, a telephone set (represented by a Terminal object) has only one telephone number (represented by an Address object) associated with it. In more complex configurations, telephone sets may have several telephone numbers associated with them. Likewise, a telephone number may appear on more than one telephone set.

Call
A Call object models a telephone call. A Call can have zero or more Connections. A two-party call has two Connections, and a conference call has three or more Connections. Each Connection models the relationship between a Call and an Address, where an Address identifies a particular party or set of parties on a Call. A Call maintain a list of the Connections on that Call. Applications obtain an array of Connections associated with the Call via the Call.getConnections() method. A Call retains a reference to a Connection only if it is not in the Connection.DISCONNECTED state. Therefore, if a Call has a reference to a Connection, then that Connection must not be in the Connection.DISCONNECTED state. When a Connection moves into the Connection.DISCONNECTED state (e.g. when a party hangs up), the Call loses its reference to that Connection which is no longer reported via the Call.getConnections() method. The Provider maintains knowledge of the calls currently associated with it. Applications may obtain an array of these Calls via the Provider.getCalls() method. A Provider may have Calls associated with it which were created before it came into existence. It is the responsibility of the implementation of the Provider to model and report all existing telephone calls which were created prior to the Provider's lifetime. The Provider maintains references to all calls until they move into the Call.INVALID state. Applications may create new Calls using the Provider.createCall() method. A new Call is returned in the Call.IDLE state. Applications may then use this idle Call to place new telephone calls. Once created, this new Call object is returned via the Provider.getCalls() method. Address and Call objects Address objects represent the logical endpoints of a telephone call. A logical view of a telephone call views the call as originating from one Address endpoint and terminates at another Address endpoint. Address objects are related to Call objects via the Connection object. The Connection object has a state which describes the current relationship between the Call and the Address. Each Address object may be part of more than one telephone call, and in each case, is represented by a separate Connection object. The Address.getConnections() method returns all Connection objects currently associated with the Call. An Address is associated with a Call until the Connection moves into the Connection.DISCONNECTED state. At that time, the Connection is no longer reported via the Address.getConnections() method. Therefore, the Address.getConnections() method will never report a Connection in the Connection.DISCONNECTED state. The Java Telephony API specification states that the implementation is responsible for reporting all existing telephone calls when a Provider is first created. This implies that an Address object must report information regarding existing telephone calls to that Address. In other words, Address objects must reports all Connection objects which represent existing telephone calls. Terminal and Call objects Terminal objects represent the physical endpoints of a telephone call. With respect to a single Address endpoint on a Call, multiple physical Terminal endpoints may exist. Terminal objects are related to Call objects via the TerminalConnection object. TerminalConnection objects are associated with Call indirectly via Connections. A Terminal may be associated with a Call only if one of its Addresses is associated with the Call. The TerminalConnection object has a state which describes the current relationship between the Connection and the Terminal. Each Terminal object may be part of more than one telephone call, and in each case, is represented by a separate TerminalConnection objet. The Terminal.getTerminalConnections() method returns all TerminalConnection object currently associated with the Terminal. A Terminal object is associated with a Connection until the TerminalConnection moves into the TerminalConnection.DROPPED state. At that time, the TerminalConnection is no longer reported via the Terminal.getTerminalConnections() method. Therefore, the Terminal.getTerminalConnections() method never reports a TerminalConnection in the TerminalConnection.DROPPED state. The Java Telephony API specification states that the implementation is responsible for reporting all existing telephone calls when a Provider is first created. This implies that an Terminal object must report information regarding existing telephone calls to that Terminal. In other words, Terminal objects must report all TerminalConnection objects which represent existing telephone calls.

Connection
A Connection represents a link (i.e. an association) between a Call object and an Address object. The purpose of a Connection object is to describe the relationship between a Call object and an Address object. A Connection object exists if the Address is a part of the telephone call. Applications use the Connection.getCall() and Connection.getAddress() methods to obtain the Call and Address associated with this Connection, respectively. From one perspective, an application may view a Call only in terms of the Address/Connection objects which are part of the Call. This is termed a logical view of the Call because it ignores the details provided by the Terminal and TerminalConnection objects which are also associated with a Call. In many instances, simple applications (such as an outcall program) may only need to concern itself with the logical view. In this logical view, a telephone call is views as two or more endpoint addresses in communication. The Connection object describes the state of each of these endpoint addresses with respect to the Call. Connection objects are immutable in terms of their Call and Address references. In other words, the Call and Address object references do not change throughout the lifetime of the Connection object instance. The same Connection object may not be used in another telephone call. The existence of a Connection implies that its Address is associated with its Call in the manner described by the Connection's state. Although a Connection's Address and Call references remain valid throughout the lifetime of the Connection object, the same is not true for the Call and Address object's references to this Connection. Particularly, when a Connection moves into the Connection.DISCONNECTED state, it is no longer listed by the Call.getConnections() and Address.getConnections() methods. Typically, when a Connection moves into the Connection.DISCONNECTED state, the application loses its references to it to facilitate its garbage collection. Connections objects are containers for zero or more TerminalConnection objects. Connection objects represent the relationship between the Call and the Address, whereas TerminalConnection objects represent the relationship between the Connection and the Terminal. The relationship between the Call and the Address may be viewed as a logical view of the Call. The relationship between a Connection and a Terminal represents the physical view of the Call, i.e. at which Terminal the telephone calls terminates.

Useful Links
Sun Java Telephony API (JTAPI)
JTapi Overview

45 questions
0
votes
1 answer

Panasonic and JTapi

I try to create a application which monitoring the outgoing calls and other PBX controls of Panasonic PBX's with Java. The Panasonic only offers the Tapi Driver, but I cannot find any tutorial or example of. Can anyone know I good tutorial or some…
KostasC
  • 1,076
  • 6
  • 20
  • 40
0
votes
2 answers

Avaya JTAPI: How to get called number after call was established

Using the Avaya implementation of JTAPI, I am trying to get the called number on a call that is already established. In other words the connection listener is registered on a call after it is established. When I try using the…
CodeWarrior
  • 508
  • 3
  • 13
0
votes
1 answer

What is the difference between the work of JTAPI and CCXML ? Why do we need JTAPI if CCXML is already there?

What is the difference between the work of JTAPI and CCXML ? Why do we need JTAPI if CCXML is already there ??
0
votes
1 answer

How to Check if State of Cisco Phone is Ringback - Cisco JTapi

I am using JTapi to control Cisco phones. I am familiar with the various states of connections, terminals, calls etc. However, I have noticed that there is no state similar to ringback. Is there a way to determine if the status of the phone is…
0
votes
2 answers

Pressing Keys Using Cisco JTapi

I am trying to press keys programmatically using Cisco JTapi. Right now I am able to make calls and receive calls using JTapi. However, I cannot find any relevant information regarding key presses. Could anyone tell me how to do this or point me in…
0
votes
1 answer

Cisco Callmanager JTAPI events flow

I wonder is there some cisco document for JTAPI events flow for some basic calls? (Cisco IP - Cisco IP, 3d-party IP - Cisco IP, Analog - Cisco IP)? Searched through Cisco JTAPI developers guide, but found flows only for transfer/agent calling
0
votes
1 answer

Unstable getting results from CiscoProvider.GetCall(int callLegID)

I have code: CiscoJtapiPeer peer = (CiscoJtapiPeer) JtapiPeerFactory.getJtapiPeer(null); CiscoProvider provider = (CiscoProvider) peer.getProvider(host+";login="+ login +";passwd=" + pass); provider.addObserver(new ProviderObserver()…
Slot555
  • 1
  • 2
0
votes
2 answers

how to import jtapi api in netbeans project?

i am a novice to java and netbeans both and complete newbie to java telephony.I am trying to import JTAPI (java telephony api) in netbeans project for past few days but i am unable to do so. I tried a lot of things and searched almost everywhere on…
0
votes
1 answer

connect to a softphone from a normal mobile phone

Can I connect to a soft phone using Asterisk on a network, from a normal mobile phone from outside the network? I'm desperate to know whether or not this is possible to connect to a soft phone from a PSTN connected mobile phone.
HVT7
  • 709
  • 4
  • 13
  • 23
0
votes
1 answer

How to capturing auxcodes using jtapi for avaya phones?

I am implementing on CTI application which will monitor all events of agent. Currently I am having trouble in getting auxcodes events. By check the agent state i get the auxcodes but i want an event for auxcode changes so that immediately i can get…
Krishna
  • 438
  • 5
  • 18
0
votes
1 answer

Find IMEI / ESN of attached device programmatically

I need to get IMEI/ESN of a mobile device when it is connected with the computer system using USB. What can I do? I came across JTAPI, but I am still not sure if there is an implementation good enough for my task. PS: I of course need to do it…
Aman Gautam
  • 3,549
  • 2
  • 21
  • 25
0
votes
3 answers

Connecting to a telephone system via java

I would like to develop a Java app that logs all incoming calls to our telephone system. We use an octopus open system provided by the telekom. After some research I found out that jtapi would be an solution but I can't find any good tutorials. Am I…
Arne Kröger
  • 91
  • 1
  • 6
-1
votes
1 answer

Transmit Audio/Music Between Phones

I have peculiar request where I need to transmit audio between Cisco IP phones when they are on a call. The reason I am doing this is so that I can get call quality reports for determining audio quality of a call. However, I am absolutely stuck…
-1
votes
1 answer

How to get status of phone Cisco Jtapi

I wanted to know how to get the status of a phone using Jtapi. I am familiar with the addressChangedEvent and terminalChangedEvent methods of address and terminal observers. However, I am having a hard time trying to get the status of an address…
-1
votes
1 answer

JTAPI Getting all the events of all calls

Colleagues, could you be so kind to help me with the following problem: what Observer will give me the ability to track all events (for Cisco UCM)? I've seen somewhere that it is possible, and even there it is possible to set what to filter. The…
Slot
  • 1
  • 2
1 2
3