SIP UA是否必须等待Ack才能重新邀请?

时间:2019-02-26 16:28:12

标签: sip

尝试确定这种情况下的正确行为。 SIP B2BUA向SBC发送邀请,SBC响应为200 OK,但在收到ACK之前,SBC发送重新邀请以修改SDP,B2BUA对此响应以500竞争条件进行响应。

通话流程:

Client          B2BUA            SBC
  |  Invite ->    |               |
  |               |  Invite ->    |
  |               |  <- 200 OK    |
  |   <- 200 OK   |               |
  |               |               |
  |               |  <- re-Invite |
  |               |  500 Race ->  |
  |               |               |

在RFC3261中,我找不到需要等待ACK的任何引用。 在section 14.1中,我确实看到了参考文献:

  2. If there is an ongoing INVITE server transaction, the TU MUST
     wait until the transaction reaches the confirmed or terminated
     state before initiating the new INVITE.

查看INVITE服务器事务图,似乎200 OK已将服务器事务移到终止状态,但是我不确定这是此情况的正确上下文。

SBC必须在发送重新邀请之前等待ACK,还是B2BUA应该接受重新邀请?

1 个答案:

答案 0 :(得分:0)

获得竞争状态是正常的,因为B2BUA试图同时处理两个INVITE请求,第一个INVITE需要正确处理。在您发送的同一文档中:

  

请注意,UAC不得在
内发起新的INVITE交易。   另一个对话正在进行的同时进行对话
  方向。

  1. If there is an ongoing INVITE client transaction, the TU MUST
     wait until the transaction reaches the completed or terminated
     state before initiating the new INVITE.

  2. If there is an ongoing INVITE server transaction, the TU MUST
     wait until the transaction reaches the confirmed or terminated
     state before initiating the new INVITE.

因此,您应该首先等待检索ACK,以确保已完成第一个INVITE的处理,因为根据INVITE事务的结果,某些消息可能会关闭对话框。对于接受的邀请,此所需消息为ACK。之后,您可以发送RE-INVITE来对SDP或其他内容进行更改。