Skip to content

Commit

Permalink
Fix answering a re-INVITE (pjsip#3770)
Browse files Browse the repository at this point in the history
  • Loading branch information
wosrediinanatour authored and dshamaev-intermedia committed Mar 22, 2024
1 parent 3eda647 commit 52c5cc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pjsip/src/pjsua-lib/pjsua_call.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down

0 comments on commit 52c5cc6

Please sign in to comment.