您的位置:首页 > 其它

SIP概念区别 Session Dialog Transaction .

2014-03-03 13:52 302 查看
1. What are the relationships and differences between dialogue, transaction and session?

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.

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.

Summay:

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.

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.

3.dialog的建立是收到UAS的响应(To tag)时开始建立的。收到180响应时建立的dialog叫做早期对话(early dialog),收到2XX的应答开始才是真正的dialog建立。

session 是媒体交换之后才建立的。具体而言就是通过offer/answer方式交换sdp的媒体。session的建立可以使INVITE-200 也可以是200-ACK。这要看媒体的交换发生的时间。具体来说,INVITE 中的消息体用sdp语言来描述自己可处理的媒体类型,200OK中带回UAS端可处理的媒体类型。这个时候媒体交换就算是完成了。也就是session建立起来了。

dialog是end-point对end-point的关系。而transcation 是hop by hop的关系。dialog通过From tag, To tag(应该说local tag,remote tag--这两个tag随着UAC和UAS而不同。)以及Call-ID 来判别。而transcation是一个SIP entity和下一个SIP entity之间请求和应答关系,是通过对Via里的branch来判别的。

4.对话和事务处于信令层,而会话处于媒体传输层。SIP使用SDP来通知传输层(RTP)来创建、增加、移除和修改会话。

5.一般来说,在会议应用中SIP可以通过请求来让另一方加入已有会话中。在这种情况下,新的对话会被创建。

参考:/article/8398583.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: