Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix answering a re-INVITE #3770

Merged
merged 2 commits into from
Jan 2, 2024

Conversation

wosrediinanatour
Copy link
Contributor

Commit f3a2613 introduces a problem with answering incoming re-INVITE manually by the app in cases, where the UAC receives the re-INVITE.

Issue #3769

Commit f3a2613 introduces a problem
with answering incoming re-INVITE manually by the app in cases, where
the UAC receives the re-INVITE.

Issue pjsip#3769
sauwming
sauwming previously approved these changes Nov 16, 2023
@sauwming sauwming linked an issue Dec 26, 2023 that may be closed by this pull request
Copy link
Member

@nanangizz nanangizz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ups, just realized that review I wrote long time ago is actually not submitted (still in pending state :)

@@ -2744,7 +2744,7 @@ 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 ||
if ((call->inv->role == PJSIP_ROLE_UAC && call->inv->state != PJSIP_INV_STATE_CONFIRMED) ||
!call->inv->invite_tsx ||
call->inv->invite_tsx->state >= PJSIP_TSX_STATE_COMPLETED)
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of evaluating invite session role (call->inv->role), perhaps the original patch should evaluate invite transaction role call->inv->invite_tsx->role, this way it will work for inital & subsequent invite, so the check conditions should have been:

if (!call->inv->invite_tsx ||
     call->inv->invite_tsx->role != PJSIP_ROLE_UAC ||
     call->inv->invite_tsx->state >= PJSIP_TSX_STATE_COMPLETED)

@sauwming sauwming merged commit 71e7087 into pjsip:master Jan 2, 2024
26 of 35 checks passed
trengginas pushed a commit that referenced this pull request Mar 11, 2024
dshamaev-intermedia pushed a commit to intermedia-net/pjproject that referenced this pull request Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Answering a re-INVITE failed for UAC
4 participants