Repository navigation
fix(dialog): send CANCEL to the INVITE's destination - #261
Merged
yeoleobun merged 3 commits intoNov 18, 2026
Merged
Conversation
A UAC INVITE sent to an explicit InviteOption::destination was cancelled to wherever the Request-URI resolved. RFC 3261 §9.1 requires the CANCEL to use the INVITE's destination address, port and transport. The dialog now keeps that destination and uses it for CANCEL. Fixes restsend#260
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.
Fixes #260.
A UAC INVITE sent to an explicit
InviteOption::destinationwas cancelled to wherever the Request-URI resolved. RFC 3261 §9.1 requires the CANCEL's destination address, port and transport to be identical to the INVITE's.DialogInnernow keeps the INVITE's destination (invite_destination, set increate_client_invite_dialog), andsend_dialog_requestuses it for CANCEL. Other in-dialog requests are unchanged.Tests
src/dialog/tests/test_cancel_destination.rssends an INVITE whose Request-URI host does not resolve, with a raw UDP peer as its destination. The peer answers 180, then:test_explicit_cancel_goes_to_the_invite_destinationcallsInviteDialog::cancel();test_dropped_invite_cancel_goes_to_the_invite_destinationdrops thedo_invitefuture.Both fail on main (no CANCEL reaches the peer) and pass with the fix.
cargo testpasses in full (685 lib tests), and clippy reports no new warnings.