📄 overview.html
字号:
</TD><TD WIDTH="80%">The <EM><STRONG>java.telephony.privatedata</STRONG></EM> package enablesapplications to communicate data directly with the underlying hardware switch.This data may be used to instruct the switch to perform a switch-specificaction. Additionally applications may use this package to "piggy-back" a pieceof data with a Java Telephony API object.</TD></TR></TABLE><BR><BR><H2><A NAME="CALLMODEL">The Java Telephony Call Model</A><HR></H2><P>The JTAPI <EM>call model</EM> consists of a half-dozen Java object. These objectsare defined using Java interfaces in the core package. Each call model objectrepresents either a physical or conceptual entity in the telephone world. Theprimary purpose of these call model objects is to describe telephone calls andthe endpoints involved in a telephone call. These call model objects arerelated to one another in specific ways, which is summarized below anddescribed in more detail in the core package specification.</P><P>The following diagram shows the JTAPI call model and the objects which composethe call model. A description of each object follow the diagram.</P><CENTER><IMG SRC="images/cmodel.gif"></CENTER><CENTER><P><FONT SIZE=-1 FACE="Helvetica"><STRONG>Figure 4: JTAPI Call Model</STRONG></FONT></P></CENTER><H3><IMG SRC="images/magenta-ball.gif">Provider Object</H3><OL><P>The Provider object is an abstraction of telephony service provider software.The provider might manage a PBX connected to a server, a telephony/fax card ina desktop machine, or a computer networking technology, such as IP. A Providerhides the service-specific aspects of the telephony subsystem and enables Javaapplications and applets to interact with the telephony subsystem in adevice-independent manner.</P></OL><H3><IMG SRC="images/magenta-ball.gif">Call Object</H3><OL><P>The Call object represents a telephone call, the information flowing betweenthe service provider and the call participants. A telephone call comprises aCall object and zero or more connections. In a two-party call scenario, atelephone call has one Call object and two connections. A conference call isthree or more connections associated with one Call object. </P></OL><H3><IMG SRC="images/magenta-ball.gif">Address Object</H3><OL><P>The Address object represents a telephone number. It is an abstraction for thelogical endpoint of a phone call. Note that this is quite distinct from aphysical endpoint. In fact, one address may correspond to several physicalendpoints (i.e. Terminals)</P></OL><H3><IMG SRC="images/magenta-ball.gif">Connection Object</H3><OL><P>A Connection object models the communication link between a Call object and anAddress object. This relationship is also referred to as a "logical" view,because it is concerned with the relationship between the Call and the Address(i.e. a logcal endpoint). Connection objects may be in one of several states,indicating the current state of the relationship between the Call and theAddress. These Connection states are summarized later.</P></OL><H3><IMG SRC="images/magenta-ball.gif">Terminal Object</H3><OL><P>The Terminal object represents a physical device such as a telephone and itsassociated properties. Each Terminal object may have one or more AddressObjects (telephone numbers) associated with it, as in the case of some officephones capable of managing multiple call appearances. The Terminal is alsoknown as the "physical" endpoint of a call, because it corresponds to aphysical piece of hardware.</P></OL><H3><IMG SRC="images/magenta-ball.gif">TerminalConnection Object</H3><OL><P>TerminalConnection objects model the relationship between a call and thephysical endpoint of a Call, which is represented by the Terminal object.This relationship is also known as the "physical" view of the call (incontrast to the Connection, which models the logical view). TheTerminalConnection describes the current state of relationship between the Calland a particular Terminal. The states associated with the TerminalConnectionare described later in this document.</P></OL><BR><BR><H2><A NAME="COREMETHODS">Core Package Methods</A></H2><P>The core package defines three methods to support its primary features: placinga telephone call, answering a telephone call, and dropping a telephone call.These methods are <STRONG>Call.connect()</STRONG>,<STRONG>TerminalConnection.answer()</STRONG>, and<STRONG>Connection.disconnect()</STRONG>, respectively.<H3><IMG SRC="images/magenta-ball.gif">Call.connect()</H3><P><OL>Once an application has an idle call object (obtained via<STRONG>Provider.createCall()</STRONG>), it may place a telephone call using the<STRONG>Call.connect()</STRONG> method. The application must specify theoriginating Terminal (physical endpoint) and the originating Address (logicalendpoint) on that Terminal (in the case that a Terminal has multiple telephonenumbers on it). It also provides the destination telephone number string. TwoConnection objects are returned from the <STRONG>Call.connect()</STRONG> method,representing the originating and destination ends of the telephone call.</OL></P><H3><IMG SRC="images/magenta-ball.gif">TerminalConnection.answer()</H3><P><OL>Applications monitor with observers (discussed later) on Terminal for whenincoming calls are presented. An incoming telephone call to a Terminal isindicated by a TerminalConnection to that Terminal in the RINGING state (seeTerminalConnection states below). At that time, applications may invoke the<STRONG>TerminalConnection.answer()</STRONG> to answer that incoming telephonecall.</OL></P><H3><IMG SRC="images/magenta-ball.gif">Connection.disconnect()</H3><P><OL>The <STRONG>Connection.disconnect()</STRONG> method is used to remove an Addressfrom the telephone call. The Connection object represents the relationship ofthat Address to the telephone call. Applications typically invoke this methodwhen the Connection is in the CONNECTED state, resulting in the Connectionmoving to the DISCONNECTED state. In the core package, application may onlyremove entire Addresses from the Call, and all of the Terminals associatedwith that Address which are part of the call are removed as well. The callcontrol extension package provides the ability for application to remove individual Terminals only from the Call.</OL></P><BR><BR><H2><A NAME="CONNECTIONSTATES">Connection Object States</A><HR></H2><P>A Connection object is always in a <em>state</em> which reflects the currentrelationship between a Call and an Address. The state in which a Connectionexists is not only important to the application for information purposes, itis always an indication of which methods and actions can be invoked on theConnection object.</P><P>The state changes which Connection objects undergo are governed by rulesshown below in a statetransition diagram. This diagram guarantees to application developers thepossible states in which the Connection object can transition given somecurrent state. These state transition rules are invaluableto application developers. The diagram below shows the possible statetransitions for the Connection object. Following this diagram is a briefsummary of the meaning of each state.</P><CENTER><IMG SRC="images/state1.gif"></CENTER><CENTER><P><FONT SIZE=-1 FACE="Helvetica">Figure 5: Connection State Transitions</FONT></P></CENTER><H3><IMG SRC="images/magenta-ball.gif">IDLE state</H3><P><OL>The IDLE state is the initial state for all new Connection objects.Connections typically transition quickly out of the IDLE state into anotherstate. A Connection in the IDLE state indicates that the party has just joinedthe telephone call in some form. No Core methods are valid on Connections inthe IDLE state.</OL></P><H3><IMG SRC="images/magenta-ball.gif">INPROGRESS state</H3><P><OL>The INPROGRESS state indicates that a telephone call is currently being placedto this destination endpoint.</OL></P><H3><IMG SRC="images/magenta-ball.gif">ALERTING state</H3><P><OL>The ALERTING state indicates that the destination party of a telephone callis being alerted to an incoming telephone call.</OL></P><H3><IMG SRC="images/magenta-ball.gif">CONNECTED state</H3><P><OL>The CONNECTED state indicates that a party is actively part of a telephonecall. A Connection in the CONNECTED state implies that the associated party istalking to the other parties on the call.</OL></P><H3><IMG SRC="images/magenta-ball.gif">DISCONNECT state</H3><P><OL>The DISCONNECTED state indicates that a party is no longer a part of atelephone call. No methods are valid for Connections in the DISCONNECTEDstate.</OL></P><H3><IMG SRC="images/magenta-ball.gif">FAILED state</H3><P><OL>The FAILED state indicates that a telephone call placed to the endpointhas failed. For example, if an application uses Call.connect() to place atelephone call to a party who is busy, the Connection associated with thecalled party transitions into the FAILED state.</OL></P><H3><IMG SRC="images/magenta-ball.gif">UNKNOWN state</H3><P><OL>The UNKNOWN state indicates that the Provider cannot determine the state ofthe Connection at the present time. A Connection may transition in and out ofthe UNKNOWN state at any time. The effects of the invocation of any method ona Connection in this state is unpredictable.</OL></P><BR><BR><H2><A NAME="TERMINALCONNECTIONSTATES">TerminalConnection Object States</A><HR></H2><P>The TerminalConnection object represents the relationship between a Terminaland a Call. As mentioned previously, these objects represent a physical viewof the Call, describing which physical Terminal endpoints are part of thetelephone call. Similar to Connection objects, TerminalConnection objects havetheir own set of states and state transition diagram. This state transitiondiagram, with a brief description of each state follows.</P><CENTER><IMG SRC="images/state2.gif"></CENTER><CENTER><P><FONT SIZE=-1 FACE="Helvetica">Figure 6: TerminalConnection state transitions</FONT></P></CENTER><H3><IMG SRC="images/magenta-ball.gif">IDLE state</H3><P><OL>The IDLE state is the initial state for all TerminalConnection objects. Ithas the same connotation for the Connection object's IDLE state.</OL></P><H3><IMG SRC="images/magenta-ball.gif">ACTIVE state</H3><P><OL>The ACTIVE state indicates a Terminal is actively part of a telephone call.This often implies that the Terminal handset is off-hook.</OL></P><H3><IMG SRC="images/magenta-ball.gif">RINGING state</H3><P><OL>The RINGING state indicates that a Terminal is signaling to a user that anincoming telephone call is present at the Terminal.</OL></P><H3><IMG SRC="images/magenta-ball.gif">DROPPED state</H3><P><OL>The DROPPED state indicates that a Terminal was once part of a telephone call,but has since dropped off of that telephone call. The DROPPED state is thefinal state for all TerminalConnections.</OL></P><H3><IMG SRC="images/magenta-ball.gif">PASSIVE state</H3><P><OL>The PASSIVE state indicates a Terminal is part of a telephone call, but notactively so. A TerminalConnection in the PASSIVE state indicates that aresource on the Terminal is being used by this telephone call. Packages whichprovide advanced features permit Terminals to join calls from the PASSIVEstate.</OL></P><H3><IMG SRC="images/magenta-ball.gif">UNKNOWN state</H3><P><OL>The UNKNOWN state indicates that the Provider is unable to determine thecurrent state of a TerminalConnection. It has a similar connotation to thatof the Connection object's UNKNOWN state.</OL></P><BR><BR><H2><A NAME="PLACINGCALL">Placing a Telephone Call<HR></H2><P>The past several sections have outlines the JTAPI call model, the key methodsin the core package, and the Connection and TerminalConnection states. Thissection ties all of this information together, presenting a common scenariofound in most telephony applications. This section describes the state changesthe entire call model typically undergoes when an application places a simpletelephone call. Readers will hopefully come away with a coherent understandingof the call model changes for this simple example.</P><P>The vehicle used to describe the state changes undergone by the call model isthe diagram below. This diagram is a <EM>call model timing diagram</EM>, wherechanges in the various objects are depicted as times increases down the vertical axis.Such a diagram is given below describing the typical state changes after anapplication invokes the <STRONG>Call.connect()</STRONG> method.</P><CENTER><P><IMG SRC="images/timeline.gif"></P></CENTER><CENTER><P><FONT SIZE=-1 FACE="Helvetica">Figure 7: Call Model timing diagram</FONT>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -