Repository navigation
TEL-711: expose the dialog state of established calls - #992
Merged
Merged
Conversation
A user agent that wants to send a request inside an existing dialog from somewhere else, or to keep a record of its dialogs, needs the dialog state of RFC 3261 section 12: the tags, the route set, the remote target, the CSeqs and the session descriptions. The call objects keep all of it in private fields. Add Dialog, a snapshot of that state, and DialogHandler, an optional extension of StateHandler like SignalingEventHandler. A call sends a snapshot when its dialog is established and after each re-INVITE it accepts. Snapshots carry a version, so a handler can drop one that arrives out of order, and a state, for early and terminated dialogs later.
A re-INVITE refreshes the remote target of a dialog (RFC 3261 section 12.2.2). The dialog state of a call kept the Contact of the first INVITE or of its answer, so a remote side that moved, for example to another of its servers, was stored with an address that no longer reaches it. The call's own requests still go to the first target; only the reported dialog state changes.
alexlivekit
reviewed
Nov 17, 2026
alexlivekit
left a comment
Contributor
There was a problem hiding this comment.
@alexfish8 , this is some duplication of the OSS dialog stuff we discussed. Might be worth a look
alexlivekit
approved these changes
Nov 19, 2026
alexlivekit
left a comment
Contributor
There was a problem hiding this comment.
LGTM!
Two notes:
- Consider also adding intermediate steps to call. This might especially useful for outbound, where it might not be answered quickly.
- We will probably fold this new dialog class into something more fleshed out soon - FYI.
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.
Problem
A user agent that wants to send a request inside an existing dialog from somewhere else, or to keep a record of its dialogs, needs the dialog state of RFC 3261 section 12: the tags, the route set, the remote target, the CSeqs and the session descriptions. The call objects keep all of it in private fields.
Change
Dialog, a snapshot of that state, andDialogHandler, an optional extension ofStateHandler, likeSignalingEventHandler.RemoteCSeqfollows only the remote side's INVITEs, so it is a lower limit of the remote sequence number.