SIP概念区别 Session Dialog Transaction

来源:互联网 发布:淘宝网购物车登录 编辑:程序博客网 时间:2024/04/29 11:30
 
http://blog.csdn.net/shanyiwen/article/details/5794115
1. What are the relationships and differences between dialogue, transaction and session?1JeVY%{!P-p!Ck

1.Adialog represents a peer-to-peer SIP relationship between two user agents that persists for some time, as a call-leg.It is identified at each UA with a dialog ID, which consists of a Call-ID, From tag and To tag. We can call a dialog is established when three values are all generated.
 
2.Asip transaction consists of a single request and any responses to that request, which includes zero or more provisional responses and one or more final responses.The branch parameter value in the VIA header is used to identify the transaction created by that request.no} Z1b!E
}q.cn,^4Bz
3.Session: In the SDP specification, a multimedia session is a set of multimedia senders and receivers and the data streams flowing from senders to receivers.  A sessionis defined by the SDP user name, session id, network type, address type, and address elements in the origin field.
A session can have multiple RTP sessions corresponding to the UDP ports define in the m= line of the SDP.www.itgoal.ne
t,C%i$x*}B
C[w`-x
Summay:sQ9q8s|A
1.Dialog and transaction are the concepts in the signalling part;But the session is the concept in the media transport part. SIP uses the SDP to notify the transport protocol(RTP) to create, add, remove and modify the sessions.r0HL
L-}z;~_

2.Generally, SIP can invite the user to attend an existing session, which occures in the conference call. In such case, the To tag as well as the call-ID which uniquely identifies a particular invitation, could be different to those of the existing dialog, so a new dialog is needed.
4. dialog的建立是收到UAS的响应(To tag)时开始建立的。收到180响应时建立的矩阵通信技术论坛--3G论坛| NGN论坛 | IP论坛 |考试认证 | 通信论坛 | 通信技术论坛 |  通信人才 |/c1w1x.nRG6p3/S
dialog叫做早期对话(early dialog),收到2XX的应答开始才是真正的dialog建立。

M-k%W

session 是媒体交换之后才建立的。具体而言就是通过offer/answer方式交换sdp的媒体。
session的建立可以使INVITE-200 也可以是200-ACK。这要看媒体的交换发生的时间。
具体来说,INVITE 中的消息体用sdp语言来描述自己可处理的媒体类型,200OK中
带回UAS端可处理的媒体类型。这个时候媒体交换就算是完成了。也就是session建立起
来了。
B%r&iBCcN
dialog是end-point对end-point的关系。而transcation 是hop by hop的关系。dialog通过p/X!C5`y        R!A|(PuD
From tag, To tag(应该说local tag,remote tag--这两个tag随着UAC和UAS而不同。)以及*p"S-}N,TQN%E
Call-ID 来判别。而transcation是一个SIP entity和下一个SIP entity之间请求和应答关系,
是通过对Via里的branch来判别的。gs)X%