Skip to content

feat(twilio): a setting lets the caller cut into the lines a relay session ends a call with - #1505

Closed
yuyixg wants to merge 1 commit into
SciSharp:masterfrom
yuyixg:fix/relay-ending-lines-interruptible
Closed

yuyixg wants to merge 1 commit into
SciSharp:masterfrom
yuyixg:fix/relay-ending-lines-interruptible

Conversation

@yuyixg

@yuyixg yuyixg commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Why

A ConversationRelay session says two lines that always play to the end (interruptible:false), each followed by end:

  • the goodbye to a caller who stayed silent (the flow's GoodbyeOnSilence, or the idle-goodbye prompt)
  • the apology of a turn that failed or timed out

Twilio acts on end only once what is queued has played. On some calls Twilio said the agent started speaking and never that it stopped; nothing queued behind that line played and none of the caller's words came through. Every case seen was on a line kept playing to the end; lines the caller may cut into never got stuck. If that happens on one of these two lines, the end behind it is never acted on and the call stays up, silent, until the caller hangs up.

What changed

  • ConversationRelay:EndingLinesInterruptible (and ConversationRelay:Agents:<id>:EndingLinesInterruptible), off by default, so nothing changes unless it is set.
  • On, both lines go out like any other line (no interruptible:false): the caller's first word stops the line, and Twilio then acts on the end.

What it costs when on

A caller who speaks over the goodbye or the apology cuts it short. The call ends there, and what they said is not answered: the session has already ended, as before.

Not verified

Whether a caller's word frees a playback Twilio takes as stuck has not been seen on a call (interruptible lines never got stuck, so there was nothing to free).

Tests

  • BotSharp.Core.UnitTests, ConversationRelay*: 17 of 17 (3 new: the goodbye with the setting on, shared and for one agent; the apology with it on). The existing tests still find both lines interruptible:false with it off.

🤖 Generated with Claude Code

…ssion ends a call with

ConversationRelay:EndingLinesInterruptible (also per agent), off by default.
On, the goodbye to a caller who stayed silent and the apology of a failed turn
go out like any other line instead of interruptible:false.

Why: Twilio acts on the "end" that follows such a line only once the line has
played, and a playback it takes as still going never has. Only lines kept
playing to the end were seen to get stuck so, and such a call stays up,
silent, until the caller hangs up. A line the caller may cut into ends at
their first word, and the call with it.

What it costs when on: a caller who speaks over the goodbye cuts it short; the
call ends there and their words are not answered, as before.

Tests: BotSharp.Core.UnitTests ConversationRelay 17 of 17 (3 new).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@yuyixg

yuyixg commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Closing without merging: these two lines were never seen to get stuck, and the goodbye is said to a caller who has already stayed silent, so a caller's word is unlikely to be there to cut it. Not worth a setting. The branch stays on the fork in case it is needed later.

@yuyixg yuyixg closed this Nov 20, 2026
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