From 52c5cc623d690171d55ba301125697dfcddabd0d Mon Sep 17 00:00:00 2001 From: Florian Xaver Date: Tue, 2 Jan 2024 06:33:16 +0100 Subject: [PATCH] Fix answering a re-INVITE (#3770) --- pjsip/src/pjsua-lib/pjsua_call.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c index 2ee412160d..b423580be3 100644 --- a/pjsip/src/pjsua-lib/pjsua_call.c +++ b/pjsip/src/pjsua-lib/pjsua_call.c @@ -2756,8 +2756,8 @@ PJ_DEF(pj_status_t) pjsua_call_answer2(pjsua_call_id call_id, if (status != PJ_SUCCESS) goto on_return; - if (call->inv->role == PJSIP_ROLE_UAC || - !call->inv->invite_tsx || + if (!call->inv->invite_tsx || + call->inv->invite_tsx->role != PJSIP_ROLE_UAC || call->inv->invite_tsx->state >= PJSIP_TSX_STATE_COMPLETED) { PJ_LOG(3,(THIS_FILE, "Unable to answer call (no incoming INVITE or "