SIP transactions and dialogs
2016-04-05 15:26
417 查看
理解事务(transaction)和对话(dialog)之间的区别是非常重要的。因为我们将在OpenSIPS脚本中使用它们。例如,有键值对属性依附于事务,有对话变量依附于对话。如果你不能识别对话和变量,那么你将很难配置SIP服务器。
A transaction occurs between a user agent client and server and comprises of all the messages from the request to the final response (including all the interim responses).The responses can be provisional, starting with one followed by two digits (for example, 180 Ringing) or final, starting with two followed by two digits (for example, 200 OK). The scope of a transaction is defined by the stack of Via headers of the SIP messages. So, the user agents, after the initial invite, don’t need to rely on DNS or location tables to route the messages.
The ACK request is a special case. For positive replies (2XX), the UAC creates a new transaction and generates a new Contact header and it can be sent straight to the UAS bypassing the proxy. However, for negative replies, it belongs to the INVITE transaction because it is not possible to create a new transaction without the Contact of the other part. In this case, the request is sent to the same proxy as INVITE.
Dialog(对话)对话是两个UAs(user agent) 之间持续一段时间的端到端(peer-to-peer)的SIP 关系. 一个对话由一个Call-ID, 一个local tag 和 一个remote tag来标识.对话过去也叫做 “call leg”。对话的建立是收到UAS的响应(To tag)时开始建立的。收到180响应时建立dialog叫做早期对话(early dialog),收到2XX的应答开始才是真正的dialog建立。
A dialog is a succession of transactions that control the creation, existence, and termination of the dialog. All dialogs do have a transaction to create them and may (or may not) have a transaction to change the dialog (mid-transaction). Additionally,the end-dialog transaction may be missing. (Some dialogs do end based on timeouts rather than on explicit termination.)
按照 rfc3665 的描述,有 11 个基本的会话建立流程。其列出的并不一定是完整的,但是覆盖了最好的例子。前两个流程在这一章节中进行了阐述——成功建立会话 Successful Session Establishment和通过两个代理建立会话 Session Establishment Through Two Proxies。其它的一些将在第11章Implementing SIP Servers中见到。
A transaction occurs between a user agent client and server and comprises of all the messages from the request to the final response (including all the interim responses).The responses can be provisional, starting with one followed by two digits (for example, 180 Ringing) or final, starting with two followed by two digits (for example, 200 OK). The scope of a transaction is defined by the stack of Via headers of the SIP messages. So, the user agents, after the initial invite, don’t need to rely on DNS or location tables to route the messages.
The ACK request is a special case. For positive replies (2XX), the UAC creates a new transaction and generates a new Contact header and it can be sent straight to the UAS bypassing the proxy. However, for negative replies, it belongs to the INVITE transaction because it is not possible to create a new transaction without the Contact of the other part. In this case, the request is sent to the same proxy as INVITE.
Dialog(对话)对话是两个UAs(user agent) 之间持续一段时间的端到端(peer-to-peer)的SIP 关系. 一个对话由一个Call-ID, 一个local tag 和 一个remote tag来标识.对话过去也叫做 “call leg”。对话的建立是收到UAS的响应(To tag)时开始建立的。收到180响应时建立dialog叫做早期对话(early dialog),收到2XX的应答开始才是真正的dialog建立。
A dialog is a succession of transactions that control the creation, existence, and termination of the dialog. All dialogs do have a transaction to create them and may (or may not) have a transaction to change the dialog (mid-transaction). Additionally,the end-dialog transaction may be missing. (Some dialogs do end based on timeouts rather than on explicit termination.)
按照 rfc3665 的描述,有 11 个基本的会话建立流程。其列出的并不一定是完整的,但是覆盖了最好的例子。前两个流程在这一章节中进行了阐述——成功建立会话 Successful Session Establishment和通过两个代理建立会话 Session Establishment Through Two Proxies。其它的一些将在第11章Implementing SIP Servers中见到。
相关文章推荐
- DWZ刷新dialog解决方法
- SQL Server误区30日谈 第1天 正在运行的事务在服务器故障转移后继续执行
- 浅析SQL Server中包含事务的存储过程
- Mysql中的事务是什么如何使用
- MySql的事务使用与示例详解
- C#分布式事务的超时处理实例分析
- C#中的事务用法实例分析
- SQL Server的事务操作隔离模式介绍
- MySQL中事务概念的简洁学习教程
- C#处理Access中事务的方法
- MC Dialog js弹出层 完美兼容多浏览器(5.6更新)
- js Dialog 去掉右上角的X关闭功能
- jquery BS,dialog控件自适应大小
- jQuery EasyUI Dialog拖不下来如何解决
- jquery ui dialog实现弹窗特效的思路及代码
- JQUERY dialog的用法详细解析
- jquery ui dialog替代confirm实例分析
- oracle 合并查询 事务 sql函数小知识学习
- jQuery实现dialog设置focus焦点的方法
- Locate a File Using a File Open Dialog Box