The CallEndCoordinator.observe() decremented _tracked_speeches on every BotStoppedSpeakingFrame, not just the one corresponding to tracked (end-node) speech. When a preceding LLM utterance finished between track_speech() and the actual fixed-speech playback, the counter was consumed prematurely, ending the call before the end-node message played. Gate the decrement behind a _current_speech_is_tracked flag that is set only when BotStartedSpeakingFrame follows a pending tracked-speech start. Co-Authored-By: Claude <noreply@anthropic.com>
4.9 KiB
4.9 KiB