SIP中的会话,对话和事务之间的区别?

roo*_*ler 11 session dialog transactions sip

会话,对话和事务之间究竟有什么区别?

一切都必须在一起吗?

sno*_*ned 26

交易

交易包括请求,收到的任何非最终(1xx)响应,以及最终响应(2xx,3xx,4xx,5xx或6xx),以及响应的确认(ACK或PRACK),除了对2xx响应的确认.例如:

SIP peer A sends an INVITE Request to SIP peer B
SIP peer B returns a Response of 100 TRYING; this is a non-final Response, so the transaction is not completed yet
SIP peer B returns 200 OK (a final response), accepting the invitation; this completes the transaction
Run Code Online (Sandbox Code Playgroud)

基本上,一个完整的请求 - 响应.

对话框

对话框只是两个SIP对等体之间的一系列事务.对话框的目的是设置,可能修改,然后拆除会话.因此,名称会话启动协议.由于在任何时间两个SIP对等体之间可能存在许多正在进行的对话(例如,两个SIP服务器之间可能有许多同时进行的呼叫),因此对话框由标头中的From,To和Call-ID字段标识.因此,如果SIP对等体A同时获得两个BYE请求,它可以查看这些字段以确定它们属于哪个对话框.
您可能在对话框中看到的一组典型事务可能包括:

SIP peer A invites SIP peer B to a session and suggests a certain codec, but does not include authentication and so is rejected
SIP peer A again invites SIP peer B to a session, this time supplying authentication, and the invitation is accepted
SIP peer B sends an invitation to change the codec used, and it is accepted
SIP peer A ends the session
Run Code Online (Sandbox Code Playgroud)

会议

会话只是在对等体之间流动的媒体流(例如音频或视频),通常由RTP(以及可能的RTCP)分组组成.例如,如果SIP用于进行语音呼叫,则会话是在端点之间发送的语音数据

要回答这个问题,你需要所有这三个,你需要交易和对话来创建会话,会议是协议的全部要点

这是一个包含对话框和事务示例的线程的链接