Skip to content

Commit

Permalink
sipsess/connect: don't create a dialog for 100 responses (#1018)
Browse files Browse the repository at this point in the history
According to RFC 3261, 100 responses can not create a dialog, so we
MUST NOT do that.

This resulted in a bug because some proxies set a To tag in the 100
Trying response without sending a Contact header and we tried (and
failed) to create a dialog from that.
  • Loading branch information
maximilianfridrich authored Nov 27, 2023
1 parent 6b81521 commit cc44939
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sipsess/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ static void invite_resp_handler(int err, const struct sip_msg *msg, void *arg)
sess->progrh(msg, sess->arg);
sdp = mbuf_get_left(msg->mb) > 0;

if (msg->scode == 100)
return;

if (sdp && sess->sent_offer) {
sess->awaiting_answer = false;
err = sess->answerh(msg, sess->arg);
Expand Down

0 comments on commit cc44939

Please sign in to comment.