Repository navigation
Conversation
Outbound calls dropped calls_active as soon as Dial returned, never observed dur_call_sec/dur_session_sec, and published SCS_ERROR before setting EndedAtNs. End the call in close(), with the end time taken before BYE, and don't mark a call active once it has ended, so every terminal update and metric covers the whole call.
close() set EndedAtNs while leaving CallStatus ACTIVE until the BYE completed, so an ended call could read as active. Set the terminal status in the same update. Start the outbound session timer when the INVITE is sent, matching dur_session_sec's INVITE-to-close definition, so room setup and pre-INVITE failures are not counted.
alexlivekit
approved these changes
Oct 21, 2026
hechen-eng
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Outbound calls dropped calls_active as soon as Dial returned, never
observed dur_call_sec/dur_session_sec, and published SCS_ERROR before
setting EndedAtNs. End the call in close(), with the end time taken
before BYE, and don't mark a call active once it has ended, so every
terminal update and metric covers the whole call.