Skip to content

Commit

Permalink
Fix answering a re-INVITE (#3770)
Browse files Browse the repository at this point in the history
  • Loading branch information
wosrediinanatour authored Jan 2, 2024
1 parent a31d048 commit 71e7087
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 @@ -2744,8 +2744,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 71e7087

Please sign in to comment.