Skip to content

Retell/base - #379

Closed
ddas-rt wants to merge 5 commits into
emiago:mainfrom
RetellAI:retell/base
Closed

ddas-rt wants to merge 5 commits into
emiago:mainfrom
RetellAI:retell/base

Conversation

@ddas-rt

@ddas-rt ddas-rt commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

ddas-rt and others added 5 commits September 17, 2026 15:11
* dialog_client: clone ACK per 2xx retransmission (fix PrependHeader panic)

WriteAck cloned the ACK once and re-sent that SAME *sip.Request on every 200 OK
retransmission. Each resend runs WriteRequest -> ClientRequestAddVia ->
Request.PrependHeader, mutating the request header slice in place. Concurrent
retransmission handlers (one per retransmitted 2xx, each on its own goroutine)
then race -> panic "index out of range" in sipgo's transaction-layer goroutine
(uncatchable by callers) -> process crash. It also accumulated a duplicate Via.

Send a fresh clone of an immutable snapshot per retransmission instead.

TestDialogClientACKRetransmissionOverlap fires overlapping retransmissions and
asserts one Via per ACK; it fails under -race on the old shared request and passes
with the fix. The old sequential TestDialogClientACKRetransmission cannot catch
this (one reply at a time, only counts ACKs).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* dialog_client: complete module rename (fix mixed emiago/RetellAI imports)

dialog_client.go kept github.com/emiago/sipgo imports while the rest of the module
was renamed to github.com/RetellAI/sipgo, so the module mixed two paths and did not
compile. Rename its imports too. The ACK-retransmission fix + overlap test are
unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* Fix ACK retransmissions bypassing the dialog route set

* Restore existing ACK comments
@ddas-rt ddas-rt closed this Oct 6, 2026
@ddas-rt
ddas-rt deleted the retell/base branch October 6, 2026 20:04
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.

1 participant