SIP 中的会话、对话和事务之间的区别?
Difference between session, dialog and transaction in SIP?
会话、对话和事务之间到底有什么区别?
所有人都必须一起出现吗?
交易
一个事务包含一个请求、收到的任何 non-final (1xx) 个响应、一个最终响应(2xx、3xx、4xx、5xx 或 6xx),以及对响应的确认( ACK 或 PRACK),除了对 2xx 响应的 ACK。例如:
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
基本上一个完整Request-Response。
对话框
对话只是两个 SIP 对等点之间的一系列事务。对话框的目的是设置,可能修改,然后拆卸 session。因此名称 Session 启动协议 。由于任何时候两个 SIP 对等方之间可能有许多正在进行的对话(例如,两个 SIP 服务器之间可能有许多同时进行的呼叫),对话由 header。因此,如果 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
Sessions
A session 只是在对等点之间流动的媒体流(例如音频或视频),通常由 RTP(也可能是 RTCP)数据包组成。例如,如果使用 SIP 进行语音呼叫,则 session 是端点之间发送的语音数据
要回答这个问题,你需要所有这三个吗,你需要交易和对话才能创建 sessions,sessions 是协议的重点
Here is a link to a thread,其中包含对话和事务的示例
会话、对话和事务之间到底有什么区别?
所有人都必须一起出现吗?
交易
一个事务包含一个请求、收到的任何 non-final (1xx) 个响应、一个最终响应(2xx、3xx、4xx、5xx 或 6xx),以及对响应的确认( ACK 或 PRACK),除了对 2xx 响应的 ACK。例如:
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
基本上一个完整Request-Response。
对话框
对话只是两个 SIP 对等点之间的一系列事务。对话框的目的是设置,可能修改,然后拆卸 session。因此名称 Session 启动协议 。由于任何时候两个 SIP 对等方之间可能有许多正在进行的对话(例如,两个 SIP 服务器之间可能有许多同时进行的呼叫),对话由 header。因此,如果 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
Sessions
A session 只是在对等点之间流动的媒体流(例如音频或视频),通常由 RTP(也可能是 RTCP)数据包组成。例如,如果使用 SIP 进行语音呼叫,则 session 是端点之间发送的语音数据
要回答这个问题,你需要所有这三个吗,你需要交易和对话才能创建 sessions,sessions 是协议的重点
Here is a link to a thread,其中包含对话和事务的示例