0
votes

Trying to determine the correct behavior in this scenario. A SIP B2BUA sends Invite to SBC, the SBC responds with 200 OK but before receiving the ACK the SBC sends a re-Invite to modify SDP, to which the B2BUA responds with 500 Race Condition.

Call flow:

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

In RFC3261 I can't find any reference that it's necessary to wait for ACK. In section 14.1 I do see reference:

  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.

Looking at the INVITE server transaction diagram it appears the 200 OK has moved the server transaction to terminated state but I'm not sure that's the correct context for this scenario.

Must the SBC wait for ACK before sending re-Invite or should the B2BUA accept the re-Invite?

1

1 Answers

0
votes

It is normal that you get race condition because B2BUA is trying to handle two INVITE request at the same time, first INVITE needs to properly processed. Inside the same document that you've sent:

Note that a UAC MUST NOT initiate a new INVITE transaction within a
dialog while another INVITE transaction is in progress in either
direction.

  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.

So you should wait to retrieve the ACK first to be sure about that the first INVITE is done processing, because according to result of INVITE transaction, some message is expected to close the dialog . For an accepted INVITE, this needed message is ACK. After that you can send RE-INVITE to make some changes about SDP or something.