怎么理解sip中对话、会话、事务

对话

Dialog: A dialog is a peer-to-peer SIP relationship between two UAs that persists for some time. A dialog is established by

SIP messages, such as a 2xx response to an INVITE request. A dialog is identified by a call identifier, local tag, and a remote tag. A dialog was formerly known as a call leg in RFC2543.

对话:一个对话指的是两个UA之间端到端的SIP关系,并且这种关系能维持一段时间。对话是通过SIP消息创建的,对于INVITE请求的2xx应答就会创建一个对话。对话是通过 call identifier(呼叫ID), local tag(本地tag), and a remote tag(远程tag)区分的。在RFC2543中对话被看做是呼叫别名。

会话

Session: From the SDP specification: "A multimedia session is a set of multimedia senders and receivers and the data streams

flowing from senders to receivers. A multimedia conference is an example of a multimedia session." (RFC 2327 [1]) (A session

as defined for SDP can comprise one or more RTP sessions.) As defined, a callee can be invited several times, by different calls, to the same session. If SDP is used, a session is defined by the concatenation of the SDP user name, session id,

network type, address type, and address elements in the origin field.

会话:根据SDP 的描述:“一个多媒体会话是多媒体的发送者和接收者以及传输与发送者与接收者之间的多媒体流,一个多媒体会议是一个多媒体会话的例子”(在SDP定义下的会话是可以包含一个或者多个RTP会话)。一个被叫方可以被邀请多次,被不同的呼叫方呼叫至同一个会话,如果使用了SDP,一个会话被SDP开头处的一些相关的SDP用户名、会话id、网络类型、地址类型元素定义。

事务

SIP Transaction: A SIP transaction occurs between a client and a server and comprises all messages from the first request sent from the client to the server up to a final (non-1xx) response sent from the server to the client. If the request is INVITE

and the final response is a non-2xx, the transaction also includes an ACK to the response. The ACK for a 2xx response to an INVITE request is a separate transaction.

sip事务:一个sip事务指的是一个客户端、一个服务器以及从第一个由客户端发往服务器的请求一直到服务器发往客户端的非1xx最终响应。如果请求是INVITE并且最终的响应是非2xx,这个事务包含客户端对服务器响应的ack确认。如果INVITE请求有2xx响应,那么最终的ACK属于一个独立的事务。

 

Transaction User (TU): The layer of protocol processing that resides above the transaction layer. Transaction users include

the UAC core, UAS core, and proxy core.

事务用户:事务用户是协议处理层,位于传输层之上。事务用户包括UAC核心、UAS核心、和代理核心。

 

总结

因为sip是端到端的信令,在完成一项工作过程当中可能是需要几次信令交互才能完成,这几次的信令交互属于一个组,怎么来标识这个组呢?就是通过事务来标识的,所以在sip当中给事务最直白的解释就是一个信令与其所有的应答组成一个事务。设置事务层的另一个作用是简化应用层的逻辑,应用层只需要关注产生消息、处理消息,对于消息是否需要重传,以及重传消息的过滤都是由事务层完成。

事务是有状态的,对话也是有状态的,那么怎么区分事务与对话呢?

在上图中描述的是Alice与Bob之间的一个对话,这个对话中包含了3个事务,F1,F2,F3组成了一个invite事务,F4是一个事务,F5,F6组成了一个非invite事务。

 

 

 

 

 

 

 

 

 

 

 

  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

heibao111728

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值