Skip to content

Commit

Permalink
connect: do not enforce Contact header in 1XX responses with To tag
Browse files Browse the repository at this point in the history
There are some SIP UAs which send 1XX responses with a To tag and
without a Contact header.
  • Loading branch information
maximilianfridrich committed Dec 12, 2023
1 parent d258bf6 commit a0e965d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sipsess/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ static void invite_resp_handler(int err, const struct sip_msg *msg, void *arg)
goto out;
}

if (pl_isset(&msg->to.tag)) {
contact = sip_msg_hdr(msg, SIP_HDR_CONTACT);

if (pl_isset(&msg->to.tag) && contact) {
err = sip_dialog_established(sess->dlg) ?
sip_dialog_update(sess->dlg, msg) :
sip_dialog_create(sess->dlg, msg);
Expand Down

0 comments on commit a0e965d

Please sign in to comment.