Developing SIP Applications with SIP Servlet
原文来自 ATAC, 无网页连接.
SIP, the Session Initiation Protocol, is a signaling protocol developed by the Internet Engineering Task Force (IETF) to allow interactive user sessions involving multimedia elements (such as voice, video, and instant messaging). SIP is currently the basic signaling and call setup protocol for IP telephony, and SIP applications are the basic way to provide voice and other multimedia services over IP.
SIP, 会话初始协议(Session Initiation Protocol), 是由 IETF 制定的一种信令协议, 用于多方的多媒体通讯, 例如语音, 视频, 和即时通讯等. SIP 是当前 IP 电话的会话建立和信令控制的基础协议, SIP 应用也是实现基于 IP 网络的语音等多种多媒体应用的基本途径.
SIP Servlet (JSR-116), developed through the Java Community Process (see www.jcp.org), is an open standard API that describes server-side component interfaces for application development. Derived from the popular Java Servlet architecture of J2EE, it brings Internet application development capabilities to the building of SIP solutions.
SIP Servlet(JSR 116)是 Java Community Process 定义的一个开发服务器端SIP应用程序的开放式标准 API. SIP Servlet 是基于目前流行的 J2EE 中的 Java Servlet 架构. 它把互联网应用程序的开发模式带到 SIP 解决方案中.
In the component-container architecture defined by SIP Servlet, a SIP application is a component that runs inside and is managed by the Servlet container or application server. By leveraging the services provided by the container, SIP application developers only need to handle high-level business logic, thus simplifying their work significantly.
SIP Servlet 基于组件与容器的架构. 每个 SIP 应用运行在容器或应用服务器内, 并由容器或应用服务器管理. 由于容器提供了大量基本服务, 所以应用开发人员只需处理上层的业务逻辑, 从而显著地简化了应用开发工作流程.
The heart of the application server is the SIP protocol stack. The server marshals and unmarshals SIP messages, manages SIP dialogs and transactions, and implements the core SIP semantics. The server then calls the application upon receiving an incoming message. The application, in turn, calls the server to send an outgoing message.
SIP 应用服务器的核心是 SIP 协议栈. 应用服务器负责接受和发送 SIP 消息, 管理 SIP 对话和事务, 实现 SIP 的核心语义. 当服务器收到消息时, 就会调用相应的应用; 在应用中也可以调用服务器来创建并发送消息.
The server also provides the following useful services:
• Application lifecycle management: the server manages the application’s lifecycle, through stages such as configuration, deployment, loading, start, and shutdown.
• Resource management: the server manages resources, such as threads, transports, memory, and timer.
• Security service: the server offers transport and message level security functions.
• Scalability and high availability: many servers offer features such as clustering and failover for high demand situations.
• Integration: the server can run both SIP applications and Web applications. This provides easy integration for applications such as a web-based telephone. The server also provides additional unified access points to other applications through the Java Naming and Directory Interface.
应用服务器还提供下面这些服务:
- 应用的生命周期管理: 服务器负责管理应用的生命周期, 例如配置, 部署, 加载, 启动和停止.
- 资源管理: 服务器负责管理各种公用资源, 例如线程, 网络传输, 内存和定时器.
- 安全服务: 服务器提供网络传输层和消息层等多种安全管理机制.
- 可伸缩性和高可靠性: 许多服务器对于高需求状况提供例如集群或故障转移等功能.
- 集成性: 服务器可以同时运行 SIP 应用和 Web 应用, 为各种应用的集成提供了简单的途径, 例如基于 Web 的电话. 通过 JNDI, 服务器也为其他应用提供了统一的访问接口.