Skip to content

REL-29: downgrade error after invite to avoid retry#736

Merged
hechen-eng merged 1 commit into
mainfrom
after-invite-error
Jul 8, 2026
Merged

REL-29: downgrade error after invite to avoid retry#736
hechen-eng merged 1 commit into
mainfrom
after-invite-error

Conversation

@hechen-eng

@hechen-eng hechen-eng commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

to make sure retry won't happen after invite is sent

@hechen-eng hechen-eng requested a review from a team as a code owner June 30, 2026 18:32
@hechen-eng hechen-eng changed the title downgrade error after invite to avoid retry REL-29: downgrade error after invite to avoid retry Jun 30, 2026
@hechen-eng hechen-eng force-pushed the after-invite-error branch from 1bb22cf to 4f331a3 Compare July 8, 2026 01:51
@hechen-eng hechen-eng merged commit 97ccade into main Jul 8, 2026
6 of 7 checks passed
@hechen-eng hechen-eng deleted the after-invite-error branch July 8, 2026 01:52

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Open in Devin Review

Comment thread pkg/sip/outbound.go
Comment on lines +423 to +426
if !c.sigTs.InviteTime.IsZero() {
// INVITE sent: a call may exist, so don't surface a retryable 5xx.
res = res.afterInvite()
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔍 InviteTime is set before the INVITE is actually transmitted, making afterInvite() conservatively broad

The InviteTime timestamp is set at pkg/sip/outbound.go:642 (inside sipSignal) before c.cc.Invite() is called at line 645. This means if the INVITE fails during transport setup (e.g., TransactionRequest at pkg/sip/outbound.go:1108 returns an error before the packet leaves the host), InviteTime is already non-zero and afterInvite() will still fire at pkg/sip/outbound.go:423-425. This is a conservative choice — treating any attempted send as potentially received — which is reasonable for SIP (you can't be certain a UDP packet wasn't delivered), but it means some purely local failures (e.g., socket creation errors) will be unnecessarily made non-retryable.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants