加载中…

加载中...

个人资料
天那边的米高
天那边的米高 新浪个人认证
  • 博客等级:
  • 博客积分:0
  • 博客访问:221,821
  • 关注人气:39
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
相关博文
推荐博文
谁看过这篇博文
加载中…
正文 字体大小:

Cisco JTAPI概述

(2011-02-15 10:53:42)
标签:

应用编程接口

思科

统一通信

概述

管理系统

it

分类: CiscoJTAPI
概述

This chapter describes the major concepts with which you need to be familiar before creating Java Telephony Application Programming Interface (JTAPI) applications for Cisco Unified Communications Manager systems.本章介绍了与您需要先创建Java电话应用编程接口(JTAPI)为思科统一通信管理系统的应用熟悉主要的概念。 It contains the following sections:它包含以下部分:

JTAPI Overview JTAPI简介

Cisco Unified JTAPI Concepts 思科统一JTAPI概念

Threaded Callbacks 螺纹回调

Alarm Services 报警服务

Required Software 所需软件

For information about Cisco Unified Communications Manager features, see Chapter 3, "Features Supported by Cisco Unified JTAPI." Also see Appendix E, "CTI Supported Devices" and Appendix D, "JTAPI Feature Matrix" for more information and CTI devices and supported features.对功能有关思科统一通信管理器,见第3章“功能JTAPI支持思科统一。”另见附录E,“城市电讯支持的设备”附录D,“JTAPI特征矩阵”的更多信息和CTI设备和支持的功能。

JTAPI Overview JTAPI简介

Cisco Unified JTAPI is a programming interface standard developed by Sun Microsystems for use with Java-based computer-telephony applications.思科统一JTAPI是一种编程接口标准由Sun Microsystems开发与基于Java的计算机电话应用中使用。 Cisco JTAPI implements the Sun JTAPI 1.2 specification with additional Cisco extensions.思科JTAPI实现太阳JTAPI额外思科扩展1.2规范。 Cisco JTAPI is used to develop applications that:思科JTAPI是用来开发应用程序:

Control and observe Cisco Unified Communications Manager phones.控制和观察思科统一通信管理器的手机。

Route calls using Computer-Telephony Integration (CTI) ports and route points (virtual devices).呼叫路由使用计算机电话集成(CTI)的港口和航线分(虚拟设备)。

Basic telephony APIs that are supported are conference, transfer, connect, answer, and redirect.支持基本的电话API是会议,转接,连接,回答,重定向。

A package of JTAPI interfaces, located in the javax.telephony.* hierarchy, defines a programming model by which Java applications interact with telephony resources. JTAPI接口的封装,在javax.telephony位于.*层次结构,定义了一个编程模型,其中的Java应用程序进行交互与电话资源。 For more information about interfaces, see Chapter x.如需接口的信息,请参见第十章 For more information about Classes (Objects, Methods, and Events) and Packages, see Chapter x and x.欲了解更多信息类(对象,方法和事件)和包,见第十章及第十

This section describes the following subjects:本节介绍了以下主题:

Cisco Unified JTAPI and Contact Centers 思科统一JTAPI,联络中心

Cisco Unified JTAPI and Enterprises 思科统一JTAPI与企业

Cisco Unified JTAPI Applications 思科统一JTAPI应用

Jtprefs Application Jtprefs应用

Cisco Unified JTAPI and Contact Centers思科统一JTAPI,联络中心

Cisco Unified JTAPI is used in a contact center to monitor device status and issue routing instructions to send calls to the right place at the right time, to start and stop recording instructions while retrieving call statistics for analysis; and to screen-pop calls into CRM applications, automated scripting, and remote call control.思科统一JTAPI是用在联络中心监控设备状态,并发出指示,发送呼叫路由到正确的位置在合适的时间,要启动和停止录制在检索指令呼叫统计分析,并把CRM到屏幕弹出来电应用,自动化脚本,和远程呼叫控制。

Cisco Unified JTAPI and Enterprises思科统一JTAPI与企业

Cisco Unified JTAPI is used in an enterprise environments to combine user availability, location, and preferences for a uniquely tailored environment for presence-based routing.思科统一JTAPI是用在企业环境结合起来,为的存在为基础的路由环境中的用户提供独一无二的量身定制,位置和喜好。 For example, in a financial environment, market data, business logic, and call control are combined in a browser-based application to enable brokers and analysts to respond to rapid changes in the global financial markets.例如,在金融环境,市场数据,业务逻辑与呼叫控制相结合,在浏览器为基础的应用,使经纪人和分析师在应对全球金融市场的迅速变化。

In a heathcare environment, call control, doctor/patient lookup, and emergency response team paging are combined in a browser-based console.在heathcare环境,呼叫控制,医生/病人查询,寻呼和紧急反应小组在一个基于浏览器的控制台相结合。 Further in a hospitality environment, caller data is linked with POS systems to automate room or restaurant reservations, dispatch taxis, and schedule wake-up calls.进一步好客的环境,来电数据链接与POS系统,自动化预订房间或餐厅,出租车调度,并安排叫醒服务。

Figure 1-1 shows a typical Cisco Unified Communications Manager and Cisco Unified JTAPI in an enterprise configuration. 图1-1显示了通信管理器和思科统一JTAPI在企业配置一个典型的思科统一。

Figure 1-1 Cisco Unified Communications Manager and Cisco Unified JTAPI图1-1思科统一通信管理器和思科统一JTAPI

 

Cisco <wbr>JTAPI概述

 

Cisco Unified JTAPI Applications思科统一JTAPI应用

A Cisco Unified JTAPI application can flow as follows:思科统一JTAPI应用程序可以流程如下:

Obtain JTAPIPeer object instance from JTAPIPeerFactory从JTAPIPeerFactory获取JTAPIPeer对象的实例

Obtain a Provider, using the getProvider() API on JTAPIPeer获取供应商,使用JTAPIPeer的getProvider()API的

Obtain from the Provider, the Terminal and Address for use in your application从供应商,终端及地址获取用于在应用程序中使用

Determine capabilities of relevant objects确定相关对象的能力

Add observers for the objects, application wishes to monitor/control新增为对象观察员,应用程序希望监视/控制

Begin application flow (for example begin calls)开始应用程序流(例如开始呼叫)

The following is an example of a basic JTAPI application.下面是一个基本JTAPI应用实例。

  public void getProvider () {公共无效getProvider(){
  try {尝试{
  JtapiPeer peer = JtapiPeerFactory.getJtapiPeer ( null ); JtapiPeer同行= JtapiPeerFactory.getJtapiPeer(空);
  System.out.println ("Got peer "+peer); System.out.println(“得到了同行”+等);
  Provider provider =供应商供应商= 
peer.getProvider("cti-server;login=username;passwd=pass"); peer.getProvider(“城市电讯服务器,登录名=用户名; passwd =密码”);
  System.out.println ("Got provider "+provider); System.out.println(“得到提供者”+供应商);
  MyProviderObserver providerObserver = new MyProviderObserver (); MyProviderObserver providerObserver =新MyProviderObserver();
  provider.addObserver(providerObserver); provider.addObserver(providerObserver);
  while (outOfService ) {而(outOfService){
  Thread.sleep(500); Thread.sleep(500);  
  } }
  System.out.println ("Provider is now in service"); System.out.println(“现在是在服务提供者”);
  Address[] addresses = provider.getAddresses();地址[]地址= provider.getAddresses();
  System.out.println ("Found "+ addresses.length +" addresses"); System.out.println(“发现”+ addresses.length +“地址”);
                                          for(int i=0; i< addresses.length; i++){为(int i = 0;我<addresses.length,我+ +){ 
  System.out.println(addresses[i]); System.out.println(地址[我]);   
  } }
  provider.shutdown(); provider.shutdown();
  } catch (Exception e){ }赶上(例外五){       
  } }
  } }

Jtprefs Application Jtprefs应用

The jtapi.ini file includes parameters that are required for configuring Cisco Unified JTAPI.该jtapi.ini文件包含用于配置思科统一JTAPI所需的参数。 Cisco Unified JTAPI looks for this file in a Java classpath.思科统一JTAPI寻找这个在Java classpath文件。 The parameters are modified by using the Jtprefs application that Cisco Unified JTAPI installs.被修改的参数使用Jtprefs应用思科统一JTAPI安装。 The Jtprefs application sets only the parameters that it requires.应用程序设置的Jtprefs只是它需要的参数。 This is beneficial because there is a single point of application administration, independent of jtapi.ini.这是有益的,因为有一个应用程序的单一管理点,jtapi.ini独立。

The jtapi.ini file contains default values, but client applications can modify values without having to specifically modify the jtapi.ini file.该jtapi.ini文件包含默认值,但是客户端应用程序可以修改,而无需专门修改jtapi.ini文件中的值。 Different instances of client applications, however, can impose different settings for these parameters.客户端应用程序的不同实例,但是,可以并处这些参数不同的设置。 The com.cisco.jtapi.extensions package defines the CiscoJtapiProperties interface.该com.cisco.jtapi.extensions包定义的CiscoJtapiProperties接口。

Applications obtain a CiscoJtapiProperties object from the CiscoJtapiPeer and make changes to the parameters by using the accessor and mutator methods.从应用取得CiscoJtapiPeer CiscoJtapiProperties对象,通过使用访问器和mutator方法对参数变化。 These properties must be set and applied to all providers that are derived from a CiscoJtapiPeer prior to the first getProvider () call on that peer.这些属性必须设置,并应用到所有被从CiscoJtapiPeer派生前第一getProvider()提供者,同龄人的呼吁。

Applications which run in non GUI based platform, in which jtprefs.ini cannot be invoked, can write a jtapi.ini file and place it along with jtapi.jar.应用系统运行在非图形界面的平台,其中jtprefs.ini不能被调用,可以编写一个文件并将其放置jtapi.ini与jtapi.jar它一起。

See the following for more information:有关详细信息,请参阅以下内容:

Fields in the jtapi.ini File, page 4-19 . 文件中的字段jtapi.ini,4-19页

Sample jtapi.ini file with default values, page 4-25 示例默认值jtapi.ini文件有了,页4-25

Cisco Unified JTAPI Concepts思科统一JTAPI概念

This section describes the following concepts:本节介绍了以下概念:

CiscoObjectContainer Interface CiscoObjectContainer接口

JtapiPeer and Provider JtapiPeer和供应商

Address and Terminal Relationships 地址和终端的关系

Connections 连接

Terminal Connections 终端连接

Terminal and Address Restrictions 码头及地址限制

CiscoConnectionID CiscoConnectionID

CiscoObjectContainer Interface CiscoObjectContainer接口

The CiscoObjectContainer interface allows applications to associate an application-defined object to objects that implement the interface.该接口允许CiscoObjectContainer关联的应用程序定义的对象来实现对象的应用程序接口。 In Cisco Unified JTAPI, the following interfaces extend the CiscoObjectContainer interface:在思科统一JTAPI,下面的接口扩展CiscoObjectContainer接口:

CiscoJTAPIPeer CiscoJTAPIPeer

CiscoProvider CiscoProvider

CiscoCall CiscoCall

CiscoAddress CiscoAddress

CiscoTerminal CiscoTerminal

CiscoConnection CiscoConnection

CiscoTerminalConnection CiscoTerminalConnection

CiscoConnectionID CiscoConnectionID

CiscoCallID CiscoCallID

JtapiPeer and Provider JtapiPeer和供应商

The Provider object, which is created through the implementation of the JtapiPeer object, acts as the main point of contact between applications and JTAPI implementations.提供者对象,它是通过JtapiPeer实现创建对象,充当应用程序之间的联系和JTAPI实现要点。 The Provider object contains the entire collection of call model objects, Addresses, Terminals, and Calls, which are controllable at any time by an application.提供者对象包含了呼叫模型对象,地址,终端和调用,这是在任何一个应用程序的时间控制整个集合。

The JTAPI Preferences (JTPREFS) application administers JtapiPeer.getServices(), which returns server names.该JTAPI偏好(JTPREFS)应用管理JtapiPeer.getServices(),它返回服务器名称。

The Provider entails two basic processes: initialization and shutdown.该供应商需要两个基本过程:初始化和关闭。

Ensure that the following information is passed in the JtapiPeer.getProvider() method for applications to obtain a CiscoProvider:确保以下信息在JtapiPeer.getProvider()方法传递的申请获得一个CiscoProvider:

Hostname or IP address for the Cisco Unified Communications Manager server主机名或IP地址为思科统一通信管理器服务器

Login of the user who is administered in the directory登录的用户是谁在目录管理

Password of the user that is specified用户的密码,指定

(Optional) Application information (This parameter may be a string of any length.) (可选)应用程序信息(此参数可以是任意长度的字符串。)

Applications must include enough descriptive information, so if the appinfo were logged in an alarm, administrators would know which application caused the alarm.应用程序必须包含足够的描述性信息,因此,如果的appInfo在报警记录,管理员会知道哪个应用程序引起的恐慌。 Applications should not include hostname or IP address where they reside, nor the time at which they were spawned.应用程序不应包括主机名或IP地址在那里居住,也没有在他们所产生的时间。 Also, ensure that no "=" or ";" characters are included in the appinfo string because they delimit the getProvider () string.同时,确保不发生“=”或“;”字符在字符串中包含在内,因为他们的appInfo划定getProvider()字符串。 When the appinfo is not specified, you can use a generic and quasi-unique name (JTAPI[XXXX]@hostname, where XXXX represents a random, four-digit number) instead.当未指定的appInfo,你可以使用一个通用和准唯一的名称(JTAPI [XXXX的] @主机名,其中XXXX代表一个随机的,四位数字)代替。

The parameters get passed in key value pairs that are concatenated in a string as follows:获得通过的关键参数值,是在一个字符串如下串联双:

JtapiPeer.getProvider("CTIManagerHostname; login =user; passwd =userpassword; appinfo =Cisco Softphone") JtapiPeer.getProvider(“CTIManagerHostname; 登录名 =用户; passwd文件 =的userPassword; 的appInfo =思科软电话”)

Initialization初始化

The JtapiPeer.getProvider() method returns a Provider object as soon as the TCP link, the initial handshake with the Cisco Unified Communications Manager, and device list enumeration are complete.该JtapiPeer.getProvider()方法返回的TCP链接Provider对象尽快,与思科统一通信管理器的初始握手,枚举和设备清单是完整的。 The provider now exists in the OUT_OF_SERVICE state.现在的供应商中存在OUT_OF_SERVICE状态。 Cisco Unified JTAPI applications must wait for the provider to go to the IN_SERVICE state before the controlled device list is valid.思科统一JTAPI应用程序必须等待供应商去之前,控制设备清单到IN_SERVICE状态是有效的。 A ProvInServiceEv event gets delivered to an object that is implementing the ProviderObserver interface.阿ProvInServiceEv事件被交付给一个对象,是实施ProviderObserver接口。


Note 注意: Implementing only the CiscoProviderObserver does not do enough; the observer must also get added to the provider with provider.addObserver().实施仅CiscoProviderObserver做得不够,还必须获得观察员一起加入provider.addObserver()供应商。 Applications must wait for a notification that the Provider is in service.应用程序必须等待通知,在服务提供者。


As a part of the QoS baselining effort in JTAPI, ProviderOpenCompletedEv provides the "DSCP value for Applications" to JTAPI.由于在JTAPI的QoS基线努力的一部分,ProviderOpenCompletedEv提供了“应用程序的DSCP值”JTAPI。 JTAPI sets this DSCP value for its connection with CTI, and all JTAPI messages to CTI will have this DSCP value as long as the Provider object exists. JTAPI设置此其与城市电讯连接DSCP值,所有JTAPI消息中天都会有这个只要提供对象存在的DSCP值。

Shutdown关机

When an application calls provider.shutdown(), JTAPI loses communications permanently with the Cisco Unified Communications Manager, and a ProvShutdownEv event gets delivered to the application.当应用程序调用provider.shutdown(),JTAPI永久失去通信与思科统一通信管理器,一个ProvShutdownEv事件被交付给应用程序。 The application can assume that the Provider will not come up again, and the application must handle a complete shutdown.应用程序可以假设供应商不会再次出现,并且应用程序必须处理一个完整的关闭。

Provider.getTerminals() Provider.getTerminals()

This method returns an array of terminals that are created for the devices that are administered in the user control list in the directory.此方法返回一个是对那些在目录中的用户控制列表管理终端设备创建数组。 Refer to the Cisco Unified Communications Manager Administration Guide to administer the user control list.请参考思科统一通信管理器管理指南管理用户控制列表。

Provider.getAddresses() Provider.getAddresses()

This method returns an array of addresses that are created from the lines that are assigned to the devices that are administered in the user control list in the directory.此方法返回一个该是从分配给了在目录中的用户管理,设备控制列表创建的地址线阵列。

Changes to the User Control List in the Directory对目录中的用户控制列表更改

If a device is added to the user control list after the JTAPI application starts, a CiscoTermCreatedEv, and the respective CiscoAddrCreatedEv, gets generated and sent to observers that are implementing the CiscoProviderObserver.如果设备被添加到应用程序启动后,JTAPI用户控制列表,CiscoTermCreatedEv,和各自的CiscoAddrCreatedEv,获取生成并发送观察员正在实施的CiscoProviderObserver。 In addition, applications can monitor the current registration state of the controlled devices and dynamically track the availability of these devices.此外,应用程序可以监视控制设备的当前状态和动态跟踪登记,这些设备的可用性。 The events for an in-service Address or Terminal get delivered to observers that are implementing the CiscoAddressObserver and the CiscoTerminalObserver.为在职的事件得到地址或终端传送到观察家认为正在实施CiscoAddressObserver和CiscoTerminalObserver。


Note 注意: Implementing only the observers does not do enough; the observers must also get added by address.addObserver() and, similarly, for the terminal by the terminal.addObserver() method.只有实现观察员做得不够,还必须获得观察员添加address.addObserver(),并同样定由terminal.addObserver()方法终端。



Note 注意: Before invoking the call.connect() method, add a CallObserver to the address or terminal that is originating the call; otherwise, the method returns an exception.之前调用call.connect()方法中,添加一个CallObserver的地址或终端所发出的呼吁是,否则,该方法返回一个异常。


Address and Terminal Relationships地址和终端的关系

The Cisco Unified Communications system architecture includes three fundamental types of endpoints:思科统一通信系统的体系结构包括三个基本类型的端点:

Phones电话

Virtual devices (media termination points and route points)虚拟设备(媒体终结点和路线点)

Gateways网关

Of these endpoints, only phones and media termination points are used by using the Cisco Unified JTAPI implementation.这些端点,只有电话和媒体终端点用于通过使用思科统一JTAPI实施。

Cisco Unified Communications Manager allows users to configure phones to have one or more lines, dialable numbers, which multiple phones may share simultaneously, or lines can be configured for exclusive use by only one phone at a time.思科统一通信管理器允许用户配置电话,有一个或多个行,可拨打号码,其中多部电话可以共享的同时,或线可以由只有一个电话同时使用专用配置。 Each line on a phone can terminate two calls simultaneously, one of which must be on hold.电话线路上的每一个两个电话同时可以终止,其中一个必须保留。

This operation acts in a similar way to the operation of the "call waiting" feature on home phones. Figure 1-2 shows two configurations: Peter and Mary share one phone line, 5001, while Paul has his own phone line, 5002.此操作行为,在同样的方式向手机操作的“呼叫等待回家”功能上。 图1-2显示了两个配置:彼得和玛丽共享一条电话线,5001,而保罗有他自己的电话线,5002。

Figure 1-2 Phone Diagram图1-2电话图

 

Cisco <wbr>JTAPI概述

 

A unique name identifies all types of Cisco Unified Communications Manager endpoints.一个唯一的名称标识,思科统一通信管理端点的所有类型。 The phone Media Access Control (MAC) address (such as, "SEP0010EB1014") identifies it, and the system administrator can assign any name to a media termination point, so long as its name is unique.这款手机媒体访问控制(MAC)地址(如“SEP0010EB1014”)标识它,系统管理员可以分配任何名义到媒体的终止点,只要它的名称好是独一无二的。

For each endpoint that a provider controls, the Cisco Unified JTAPI implementation uses the administrator-assigned name to construct a corresponding terminal object.对于每一个端点,一个供应商控制,思科统一JTAPI实现使用管理员指定的名称建立一个相应的终端对象。 Terminal objects in turn have one or more address objects, each of which corresponds to a line on the endpoint.反过来终端对象有一个或多个地址对象,每个对象对应一个端点上线。 Figure 1-2 "Address and Terminal Relationship" shows a graphical representation of the relationship between addresses and terminals.图1-2“地址和终端的关系”显示了地址和终端之间的关系的图形表示。

Figure 1-3 Address and Terminal Relationship图1-3地址和终端的关系

Cisco <wbr>JTAPI概述

 

If two or more endpoints share a line (DN), the corresponding address object is related to more than one terminal object.如果两个或多个端点共享一条线(DN)的,相应的地址对象涉及多个终端的对象。

Unobserved Addresses and Terminals没有观察到的地址和端口

Cisco Unified JTAPI learns about calls only when a CallObserver attaches to the terminals and addresses of the provider.思科统一JTAPI更进一步了解来电只有当一个CallObserver重视终端和提供者的地址。 This means that methods such as Provider.getCalls() or Address.getConnections() will return null, even when calls exist at the address, unless a CallObserver attaches to the address.这意味着诸如Provider.getCalls()或Address.getConnections()方法将返回null,甚至当通话存在的地址,除非CallObserver重视的地址。 The system also requires adding a CallObserver to the address or terminal that is originating a call via the Call.connect() method.该系统还需要添加一个CallObserver的地址或终端是原产通过Call.connect()方法调用。

Connections连接

Connections retain their references to calls and addresses forever.连接保留其引用的呼吁和地址永远。 So, a connection reference that is obtained from a call event can always be used to obtain the connection call (getCall()) and address (getAddress()).因此,一个连接的引用是通过调用事件得到可以随时用来获取连接调用(getCall())和地址(getAddress())。

Terminal Connections终端连接

Terminal connections always retain their references to terminals and connections.始终保持自己的终端连接到终端和连接的引用。 So, a terminal connection reference that is obtained from a call event can always be used to obtain the terminal connection terminal (getTerminal()) and connection (getConnection()).因此,终端连接的引用也就是从一个呼叫事件总是可以得到用于获取终端连接终端(getTerminal())和连接(的getConnection())。

Terminal and Address Restrictions码头及地址限制

Terminal and address restrictions prohibit applications from controlling and monitoring a certain set of terminals and addresses when the administrator configures them as restricted in Cisco Unified Communications Manager Administration.码头及地址限制禁止从控制和监控终端和地址时设置的管理员的某些配置它们,如思科统一通信管理器管理严格的应用。

The administrator can configure a particular line on a device (address on a particular terminal) as restricted.管理员可以配置一个设备上(在特定的终端地址)限制特定的行。 If a terminal is added into the restricted list in Cisco Unified Communications Manager Administration, all addresses on that terminal are also marked as restricted in JTAPI.如果一个终端到思科统一通信管理器管理限制清单中了,在该终端的所有地址也已标记为限制JTAPI。 If an application comes up after the configuration is completed, it can know whether a particular terminal or address is restricted from checking the interface CiscoTerminal.isRestricted() and CiscoAddress.isRestricted(Terminal).如果应用程序过来后,配置完成后,它可以知道是否有特定的终端或地址是从检查接口CiscoTerminal.isRestricted()和CiscoAddress.isRestricted(终端)的限制。 For shared lines, applications can query the interface CiscoAddress.getRestrictedAddrTerminals(), which indicates whether an address is restricted on any terminals.对于线路共享,应用程序可以查询界面CiscoAddress.getRestrictedAddrTerminals(),这表明不论在任何一个地址是终端限制。

If a line (address on a terminal) is added into the restricted list after an application comes up, the applications will see CiscoAddrRestrictedEv.如果某行(在终端地址)进入限制列表中添加应用程序后出现时,应用程序将看到CiscoAddrRestrictedEv。 If the address has any observers, applications will see CiscoAddrOutOfService.如果地址有任何观察员,应用程序会看到CiscoAddrOutOfService。 When a line is removed from the restricted list, applications will see CiscoAddrActivatedEv.当一行是从受限制的名单中删除,应用程序会看到CiscoAddrActivatedEv。 If an address has any observers, applications see CiscoAddrInServiceEv.如果地址有任何观察员,应用程序见CiscoAddrInServiceEv。 If an application tries to add observers on an address after it is restricted, a PlatformException gets thrown.如果一个应用程序试图添加一个地址后,只限于观察员,一PlatformException得到抛出。 However, if any observers are added before the address is restricted, they will remain as is, but applications cannot get any events on these observers unless the address is removed from the restricted list.但是,如果任何观察员加入地址之前受到限制,他们将继续,但是应用程序无法获取有关这些观察员的任何事件,除非该地址是从受限制的名单中删除。 Applications can also choose to remove observers from an address.应用程序还可以选择删除一个地址观察员。

If a device (terminal) is added to the restricted list after an application comes up, the application will see CiscoTermRestrictedEv.如果一个设备(终端)被添加到限制列表申请后出现时,应用程序将看到CiscoTermRestrictedEv。 If the terminal has any observers, the application will see CiscoTermOutOfService.如果终端有任何观察员,应用程序将看到CiscoTermOutOfService。 If a terminal is added to the restricted list, JTAPI also restricts all addresses that belong to that terminal and applications will see CiscoAddrRestrictedEv.如果终端添加到限制列表中,JTAPI也限制所有地址属于该终端和应用将看到CiscoAddrRestrictedEv。 If a terminal is removed from the restricted list, applications will see CiscoTermActivatedEv and CiscoAddrActivatedEv for the corresponding addresses.如果终端是从受限制的名单中删除,应用程序会看到相应的地址CiscoTermActivatedEv和CiscoAddrActivatedEv。 If an application tries to add observers on a terminal after it is added to the restricted list, a PlatformException is thrown.如果一个应用程序试图添加一个终端观察员后,它被添加到受限制的清单,PlatformException异常。 However, if any observers are added before the terminal is restricted, they will remain as is, but applications cannot get any events on these observers unless the terminal is removed from the restricted list但是,如果之前的任何观察员加入终端受到限制,他们将继续,但是应用程序无法获取有关这些观察员的任何事件,除非该终端是从受限制的名单中除名

If a shared line is added to the restricted list after an application comes up, the application will see CiscoAddrRestrictedOnTerminalEv.如果共享行被添加到受限制的名单申请后出现时,应用程序将看到CiscoAddrRestrictedOnTerminalEv。 If any address observers exist on the address, the application will see CiscoAddrOutOfServiceEv for that terminal.如果任何地址观察员存在的地址,应用程序会看到该终端CiscoAddrOutOfServiceEv。 If all shared lines are added to the restricted list, when the last one is added, applications will see CiscoAddrRestrictedEv.如果所有共享线路的限制将被添加到列表中,当最后一个被添加,应用程序将看到CiscoAddrRestrictedEv。 If a shared line is removed from the restricted list after the application comes up, applications will see CiscoAddrActivatedOnTerminalEv.如果共享线是从受限制的名单中除名申请后出现时,应用程序将看到CiscoAddrActivatedOnTerminalEv。 If any observers exist on the address, the application will see CiscoAddrInServiceEv for that terminal.如果任何观察员存在的地址,应用程序会看到该终端CiscoAddrInServiceEv。 If all shared lines in the control list are removed from the restricted list, applications will see CiscoAddrActivatedEv when the last one is removed, and all addresses on terminals will receive InService events.如果在控制列表中的所有共享线路是从受限制的名单中删除,应用程序将看到CiscoAddrActivatedEv当最后一个被删除,并且在终端的所有地址都会收到在职事件。

If all shared lines in the control list are marked as restricted, and an application tries to add observers, a platform exception is thrown.如果在控制列表中的所有共享线路被标记为受限制,以及一个应用程序试图添加观察员,一个平台异常。 If a few shared lines are in the restricted list, while others are not, when an application adds an observer on the address only non-restricted lines will go in service.如果几个共享线路限制列表中,有的则没有,当一个应用程序中添加一个唯一的地址非限制线将在服务的观察员。

If any active calls are present when an address or terminal is added to the restricted list and reset, applications will see connection and TerminalConnections get disconnected.如果有任何活动时在场呼叫终端地址或添加到限制列表和复位,应用程序会看到连接和TerminalConnections得到断开。

If no addresses or terminals are added to the restricted list, this feature is backward compatible with earlier versions of JTAPI: no new events are delivered to applications.如果没有地址或终端添加到限制列表中,这个功能是向后兼容早期版本的JTAPI:没有新的事件传递给应用程序。

The following sections describe the interface changes for address and terminal restrictions.以下各节描述了地址和终端限制的界面变化。

CiscoTerminal CiscoTerminal

 

boolean 布尔

 isRestricted() isRestricted() 

Indicates whether a terminal is restricted.指示是否终端受到限制。 If the terminal is restricted, all associated addresses on this terminal are also restricted.如果终端受到限制,在此终端所有关联的地址也受到限制。 Returns true if the terminal is restricted; returns false if it is not restricted.返回true如果终端受到限制;返回false,如果它不限制。


 

CiscoAddress CiscoAddress

 

javax.telephony. javax.telephony。
Terminal[] 码头[]

 getRestrictedAddrTerminals() getRestrictedAddrTerminals() 
 

Returns an array of terminals on which this address is restricted.返回一个数组的终端上这个地址受到限制。 If none are restricted, this method returns null.如果没有受到限制,此方法返回null。

In shared lines, a few lines on terminals may be restricted.在共享线路,终端上的几行可能会受到限制。 This method returns all the terminals on which this particular address is restricted.此方法将返回所有在此特定的地址是受限制的终端。 Applications cannot see any call events for restricted lines.应用程序可以看不到有任何的限制呼叫事件。 If a restricted line is involved in a call with any other control device, an external connection gets created for the restricted line.如果有限制行是在与任何其它控制装置呼叫所涉及,外部连接被创建的限制线。

boolean 布尔

 isRestricted ( isRestricted(  javax.telephony.Terminal terminal ) javax.telephony.Terminal终端)

Returns true if any address on this terminal is restricted.返回true如果有这方面的终端地址受到限制。
Returns false if no addresses on this terminal are restricted.返回false如果在此终端没有地址都受到限制。


 

 public interface CiscoRestrictedEv extends CiscoProvEv {公共接口CiscoRestrictedEv延伸CiscoProvEv { 
  public static final int ID = com.cisco.jtapi.CiscoEventID.CiscoRestrictedEv;公共静态最后int的ID = com.cisco.jtapi.CiscoEventID.CiscoRestrictedEv;

   * /
  public final static int CAUSE_USER_RESTRICTED = 1;已公开的最终静态诠释CAUSE_USER_RESTRICTED = 1;
  public final static int CAUSE_UNSUPPORTED_PROTOCOL = 2;已公开的最终静态诠释CAUSE_UNSUPPORTED_PROTOCOL = 2;
  } }

This is the base class for restricted events and defines the cause codes for all restricted events.这是限制事件的基类,并定义了所有限制事件的原因代码。 CAUSE_USER_RESTRICTED indicates the terminal or address is marked as restricted. CAUSE_USER_RESTRICTED显示终端或地址被标记为受限制。 CAUSE_UNSUPPORTED_PROTOCOL indicates that the device in the control list is using a protocol that is not supported by Cisco Unified JTAPI. CAUSE_UNSUPPORTED_PROTOCOL表明,在控制列表中选择设备使用的是不是由思科统一JTAPI支持的协议。 Existing Cisco Unified IP 7960 and 7940 phones that are running SIP fall in this category.现有的Cisco Unified IP电话7960和7940正在运行的SIP属于这一类。

CiscoAddrRestrictedEv CiscoAddrRestrictedEv

Public interface CiscoAddrRestrictedEv extends CiscoRestrictedEv.公共接口CiscoAddrRestrictedEv延伸CiscoRestrictedEv。 Applications will see this event when a line or an associated device is designated as restricted from Cisco Unified Communications Manager Administration.应用程序将看到此事件时,将线路或相关的装置被指定为思科统一通信管理器管理的限制。 For restricted lines, the address will go out of service and will not come back in service until it is activated again.对于限制线,该地址将走出去服务,将不服务,直到它被激活了。 If an address is restricted, addCallObserver and addObserver will throw an exception.如果地址是有限的,addCallObserver和addObserver将抛出一个异常。 For shared lines, if a few shared lines are restricted, and others are not, no exception is thrown, but restricted shared lines will not receive any events.对于共享线路,如果几个共享线路受到限制,和其他人都没有,不抛出任何异常,但限制共享线路将不会收到任何事件。 If all shared lines are restricted, an exception is thrown when adding observers.如果所有共享线路受到限制,将引发异常时加入观察员。 If an address is restricted after adding observers, applications will see CiscoAddrOutOfServiceEv, and when the address is activated, the address will go in service.如果一个地址后加入观察员的限制,应用程序将看到CiscoAddrOutOfServiceEv,当被激活的地址,该地址将去服务。

CiscoAddrActivatedEv CiscoAddrActivatedEv

Public interface CiscoAddrActivatedEv extends CiscoProvEv.公共接口CiscoAddrActivatedEv延伸CiscoProvEv。 Applications will see this event whenever a line or an associated device is in the control list and is removed from the restricted list in the Cisco Unified Communications Manager Administration.申请将看到此事件每当行或相关的装置在控制清单,并从在思科统一通信管理器管理限制清单中删除。 If any observers exist on the address, applications will see CiscoAddrInServiceEv.如果任何观察员存在的地址,应用程序会看到CiscoAddrInServiceEv。 If no observers exist, applications can try to add observers, and the address will go in service.如果没有观察员存在,应用程序可以尝试添加观察员,地址将投入服务。

CiscoAddrRestrictedOnTerminalEv CiscoAddrRestrictedOnTerminalEv

Public interface CiscoAddrRestrictedOnTerminalEv extends CiscoRestrictedEv.公共接口CiscoAddrRestrictedOnTerminalEv延伸CiscoRestrictedEv。 If a user has a shared address in the control list, and if one of the lines is added into the restricted list, this event will be sent.如果用户有一个在控制列表共享地址,如果其中一条线路是进入限制列表指出,这个事件将被发送。 Interface getTerminal() returns the terminal on which the address is restricted.接口getTerminal()返回该地址上的限制终端。 Interface getAddress() returns the address that is restricted.接口getAddress()返回的是受限制的地址。

 

javax.telephony.Address javax.telephony.Address

 getAddress() getAddress()  
 

javax.telephony.Terminal javax.telephony.Terminal

 getTerminal() getTerminal() 

 

CiscoAddrActivatedOnTerminal CiscoAddrActivatedOnTerminal

Public interface CiscoAddrActivatedOnTerminalEv extends CiscoProvEv.公共接口CiscoAddrActivatedOnTerminalEv延伸CiscoProvEv。 When a shared line or a device that has a shared line is removed from the restricted list, this event will be sent.当一个共享线路或设备,有一个共同的线是从受限制的名单中剔除,这一事件将被发送。 The interface getTerminal() returns the terminal that is being added to the address.该接口getTerminal()返回被添加到地址终端。 The interface getAddress() returns the address on which the new terminal is added.该接口getAddress()返回在其上添加新的终端地址。

 

javax.telephony.Address javax.telephony.Address

 getAddress() getAddress() 

javax.telephony.Terminal javax.telephony.Terminal

 getTerminal() getTerminal() 

 

CiscoTermRestrictedEv CiscoTermRestrictedEv

Public interface CiscoTermRestrictedEv extends CiscoRestrictedEv.公共接口CiscoTermRestrictedEv延伸CiscoRestrictedEv。 Applications will see this event when a device is added into restricted list from Cisco Unified Communications Manager Administration after the application launches.应用时,会看到此事件从一个设备到思科统一通信管理器管理限制清单后,应用程序启动补充说。 Applications will not be able to see events for restricted terminals or addresses on those terminals.申请将不能够看到这些限制终端或终端地址的事件。 If a terminal is restricted when it is in InService state, applications will get this event and terminal and corresponding addresses will move to the out-of-service state.如果终端限制在在职时的状态,应用程序将获得本次活动和终端以及相应的地址将移动到外的服务的状态。

CiscoTermActivatedEv CiscoTermActivatedEv

Public interface CiscoTermActivatedEv extends CiscoRestrictedEv.公共接口CiscoTermActivatedEv延伸CiscoRestrictedEv。

 

javax.telephony.Terminal javax.telephony.Terminal

 getTerminal() getTerminal() 
 

Returns the terminal that is activated and is removed from the restricted list.返回的被激活,并从终端限制名单上除名。


 

CiscoOutOfServiceEv CiscoOutOfServiceEv

 

static int 静态诠释

 CAUSE_DEVICE_RESTRICTED CAUSE_DEVICE_RESTRICTED 
 

Indicates whether an event is sent because a device is restricted.表示事件是否发送,因为一个设备的限制。

static int 静态诠释

 CAUSE_LINE_RESTRICTED CAUSE_LINE_RESTRICTED 
 

Indicates whether an event is sent because a line is restricted.表示事件是否发送,因为一行受到限制。


 

CiscoCallEv CiscoCallEv

 

static int 静态诠释

 CAUSE_DEVICE_RESTRICTED CAUSE_DEVICE_RESTRICTED 
 

Indicates whether an event is sent because a device is restricted.表示事件是否发送,因为一个设备的限制。

static int 静态诠释

 CAUSE_LINE_RESTRICTED CAUSE_LINE_RESTRICTED 

Indicates whether an event is sent because a line is restricted.表示事件是否发送,因为一行受到限制。


 

CiscoConnectionID CiscoConnectionID

The CiscoConnectionID object represents a unique object that is associated with each connection in Cisco Unified JTAPI.该CiscoConnectionID对象代表一个唯一的对象是与每个连接关联的思科统一JTAPI。 Applications may use the object itself or the integer representation of the object.应用程序可能使用该对象本身或对象的整数表示。

Threaded Callbacks螺纹回调

The Cisco Unified JTAPI implementation design allows applications to invoke blocking JTAPI methods such as Call.connect() and TerminalConnection.answer() from within their observer callbacks.思科统一JTAPI实现的设计允许应用程序调用阻塞JTAPI方法,如Call.connect()和TerminalConnection.answer()从他们的观察员回调。 This means that applications do not get subjected to the restrictions that are imposed by the JTAPI 1.2 specification, which cautions applications against using JTAPI methods from within observer callbacks.这意味着应用程序没有得到遭受了由该JTAPI 1.2规范,其中警告不要使用回调JTAPI内观测方法的应用限制。

CiscoSynchronousObserver Interface CiscoSynchronousObserver接口

The Cisco Unified JTAPI implementation allows applications to invoke blocking JTAPI methods, such as Call.connect() and TerminalConnection.answer(), from within observer callbacks.思科统一JTAPI实现允许应用程序调用阻塞JTAPI方法,如Call.connect()和TerminalConnection.answer()从观察员回调。 This means that applications are not subject to the restrictions that are imposed by the JTAPI 1.2 specification, which cautions against using JTAPI methods from within observer callbacks.这意味着应用程序不会受到由该JTAPI 1.2规范,这与使用方法,在观察员回调JTAPI警告限制。 Applications can selectively disable the queuing logic of the Cisco Unified JTAPI implementation by implementing the CiscoSynchronousObserver interface on their observer objects.应用程序可以有选择地禁用通过实施对他们的观察对象CiscoSynchronousObserver接口的思科统一JTAPI实施排队逻辑。

This asynchronous behavior does not adversely affect many applications.这种异步行为不产生负面影响许多应用程序。 Applications that would benefit from a coherent call model during observer callbacks can selectively disable the queuing logic of the Cisco Unified JTAPI implementation.应用程序将受益于一个连贯的过程中观察员回调调用模型可以选择性地关闭思科统一JTAPI实施排队逻辑。 By implementing the CiscoSynchronousObserver interface on its observer objects, an application declares deliver synchronous events to its observers.通过实施其观测对象CiscoSynchronousObserver界面,应用程序提供的同步事件宣告其观察员。 Events that are delivered to synchronous observers will match the states of the call model objects that are queried from within the observer callback.被送到同步观察员活动将匹配的呼叫模型是从观察者质疑回调对象的状态。


Note 注意: Objects that implement the CiscoSynchronousObserver interface must not invoke blocking JTAPI methods from within their event callbacks.对象实现了CiscoSynchronousObserver接口不能阻止事件调用回调方法,从在其JTAPI。 The unpredictable consequences of doing so may include deadlocking the JTAPI implementation.这样做的难以预料的后果可能包括死锁的JTAPI实施。 However, objects may safely use the access or methods of any JTAPI object, for instance Call.getConnections() or Connection.getState().然而,对象可以安全地访问或使用,例如Call.getConnections()或Connection.getState()任何JTAPI对象的方法。


Querying Dynamic Objects查询动态对象

Beware of querying dynamic objects such as call objects.当心如来电查询对象的动态对象。 By the time you get an event, the object (such as, call) may be in a different state than the state that is indicated.到时候你得到一个事件,对象(如电话),可在比这是表明国家不同的状态。 For example, by the time you get a CiscoTransferStartEV, the transferred call may have removed all its internal connections.例如,当你得到一个CiscoTransferStartEV,该转让调用可能已删除了所有的内部连接。

callChangeEvent() callChangeEvent()

When the callChangedEvent() method is called, the validity remains guaranteed for any references that are contained in the event.当callChangedEvent()方法被调用,其有效性仍保证在任何事件中包含的参考。 For example, if the event contains a getConnection() method, the application can call this method and get a valid connection reference.例如,如果事件包含一个getConnection()方法,应用程序可以调用此方法,并获得有效的连接参考。 Likewise, a getCallingAddress() method guarantees to return a valid Address object.同样,getCallingAddress()方法返回一个有效的保证Address对象。

CiscoConsultCall CiscoConsultCall

For the CiscoConsultCall interface, a reference to a consulting terminal connection gets retained forever.对于CiscoConsultCall接口,终端连接到参考咨询得到永久保存。 For example, when a CiscoConsultCallActive event is processed, getConsultingTerminalConnection() guarantees to return a valid terminal connection reference.例如,当一个CiscoConsultCallActive事件处理,getConsultingTerminalConnection()返回一个有效的保证终端连接的引用。 Further, the terminal connection guarantees to provide access to the consulting connection and thus the consulting call.此外,终端连接保证提供咨询访问连接,从而咨询电话。

CiscoTransferStartEv CiscoTransferStartEv

For the CiscoTransferStartEv, the references to the transferred call, transfer controller, and final call in the event become valid when callChangedEvent() is called.对于CiscoTransferStartEv,对呼叫转移,转移控制器,并在最后调用成为事件时有效callChangedEvent()被调用参考。 However, getConnections() may or may not return the connections on these calls.然而,getConnections()可能会或可能不会返回这些呼叫的连接。

Alarm Services报警服务

Part of the general serviceability framework for Cisco Unified Communications applications includes support for sending alarms to a service.思科的统一通信应用程序的一般服务性框架的一部分,包括警报发送到服务支持。 The com.cisco.services.alarm package defines the alarm components.该com.cisco.services.alarm包定义报警组件。

An alarm interface and framework support the sending of alarm notifications in XML over TCP to an Alarm Service that is available on the network in a Cisco Unified JTAPI application.报警接口和框架,支持以XML在TCP报警通知发送到报警服务,可以用在一个思科统一JTAPI应用网络。 The alarm package includes the following features:报警包中包含以下功能:

XML definition of alarms, resolved by a catalog in the alarm service XML定义报警,由目录解决了报警服务

A bounded rollover queue to buffer alarms at the sender一个有界缓冲区队列过渡发件人警报

Alarm sending on a separate thread to avoid blocking at the sending application报警发送到一个单独的线程避免在发送应用程序阻塞

A TCP-based reconnection scheme to the alarm service基于TCP的重新连接到报警服务计划

The overall framework of the Cisco Unified JTAPI alarm system is similar to the existing JTAPI tracing package.在思科统一JTAPI报警系统的总体框架是类似现有JTAPI跟踪包。 Applications must instantiate an AlarmManager for a particular facility code from which alarm objects can be created.应用程序必须实例化一个特定设备代码报警对象从中可以创建AlarmManager。 Part of the implementation includes DefaultAlarm and DefaultAlarmWriter implementation classes.实施的一部分,包括DefaultAlarm和DefaultAlarmWriter实现类。

Required Software所需软件

The following table lists the software requirements for JTAPI applications, JTPREFS, and sample code.下表列出了JTAPI应用,JTPREFS和示例代码的软件要求。

.

Application应用
Required Software所需软件
Examples范例

JTAPI applications JTAPI应用

Any JDK 1.4.2 compliant Java environment任何JDK 1.4.2兼容的Java环境

Internet Explorer 4.01 or later Internet Explorer 4.01或更高版本

Sun JDK 1.4.2 or 1.5的Sun JDK 1.4.2或1.5

JTPREFS JTPREFS

Any JDK 1.4.2 compliant environment.任何JDK 1.4.2兼容的环境。

Sample code示例代码

Microsoft Internet Explorer 4.01 or later微软的Internet Explorer 4.01或更高版本


 


0

阅读 评论 收藏 转载 喜欢 打印举报/Report
  • 评论加载中,请稍候...
发评论

    发评论

    以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

      

    新浪BLOG意见反馈留言板 电话:4000520066 提示音后按1键(按当地市话标准计费) 欢迎批评指正

    新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 会员注册 | 产品答疑

    新浪公司 版权所有