diff --git a/pjsip/src/pjsip/sip_dialog.c b/pjsip/src/pjsip/sip_dialog.c index bc5323f0e6..15e864dd3f 100644 --- a/pjsip/src/pjsip/sip_dialog.c +++ b/pjsip/src/pjsip/sip_dialog.c @@ -1944,8 +1944,7 @@ void pjsip_dlg_on_rx_response( pjsip_dialog *dlg, pjsip_rx_data *rdata ) */ if ((dlg->state == PJSIP_DIALOG_STATE_NULL && pjsip_method_creates_dialog(&rdata->msg_info.cseq->method) && - (res_code > 100 && res_code < 300) && - rdata->msg_info.to->tag.slen) + (res_code > 100 && res_code < 300)) || (dlg->role==PJSIP_ROLE_UAC && !dlg->uac_has_2xx && diff --git a/tests/pjsua/scripts-sipp/uas-answer-200-without-to-tag.py b/tests/pjsua/scripts-sipp/uas-answer-200-without-to-tag.py new file mode 100644 index 0000000000..607b8b68ba --- /dev/null +++ b/tests/pjsua/scripts-sipp/uas-answer-200-without-to-tag.py @@ -0,0 +1,6 @@ +# +import inc_const as const + +PJSUA = ["--null-audio --max-calls=1 --no-tcp $SIPP_URI"] + +PJSUA_EXPECTS = [[0, const.STATE_CONFIRMED, "U"]] diff --git a/tests/pjsua/scripts-sipp/uas-answer-200-without-to-tag.xml b/tests/pjsua/scripts-sipp/uas-answer-200-without-to-tag.xml new file mode 100644 index 0000000000..4f5be9f234 --- /dev/null +++ b/tests/pjsua/scripts-sipp/uas-answer-200-without-to-tag.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +