calls: send session-terminate when the media path closes or fails #9

Closed
asxpi wants to merge 0 commits from asxpi/libtacky:fix/calls-terminate-on-media-close into develop
Member

When the pc reports closed or failed, OnPcState tears the media down
and Finish sends only XEP-0353's . A peer that ends a Jingle
session only on session-terminate (another.im's Android app) keeps
such a call up, its video frozen, after the desktop has hung up.

Tell the peer in Jingle too, as the fatal media error path already
does: session-terminate with success when the path closed, and with
connectivity-error when it failed, once Jingle has started.

Two tests in test_calls_media.tcl check the terminate for both; they
fail without this change. Tested against the Android app: hanging up
on the desktop now ends the call on the phone.

Written and tested on v1.0.0-rc7 (b40975d6); rebased onto develop (7b31417d), where it applies cleanly.

🤖 Generated with Claude Code

When the pc reports closed or failed, OnPcState tears the media down and Finish sends only XEP-0353's <finish/>. A peer that ends a Jingle session only on session-terminate (another.im's Android app) keeps such a call up, its video frozen, after the desktop has hung up. Tell the peer in Jingle too, as the fatal media error path already does: session-terminate with success when the path closed, and with connectivity-error when it failed, once Jingle has started. Two tests in test_calls_media.tcl check the terminate for both; they fail without this change. Tested against the Android app: hanging up on the desktop now ends the call on the phone. Written and tested on v1.0.0-rc7 (b40975d6); rebased onto develop (7b31417d), where it applies cleanly. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
When the pc reports closed or failed, OnPcState tears the media down
and Finish sends only XEP-0353's <finish/>. A peer that ends a Jingle
session only on session-terminate (another.im's Android app) keeps
such a call up, its video frozen, after the desktop has hung up.

Tell the peer in Jingle too, as the fatal media error path already
does: session-terminate with success when the path closed, and with
connectivity-error when it failed, once Jingle has started.

Two tests in test_calls_media.tcl check the terminate for both; they
fail without this change. Tested against the Android app: hanging up
on the desktop now ends the call on the phone.

Assisted-by: Claude:opus-5-5
Owner

Merged by hand into develop (merge commit in the 8411e18f line) and released in v1.0.0-rc10; thank you. PR #10 went in with a review follow-up (6996b1f9: the wire-answer parse under test, a deadline on the poll, the resolve() doc). Closing, since a hand merge is not marked merged here.

Merged by hand into develop (merge commit in the 8411e18f line) and released in v1.0.0-rc10; thank you. PR #10 went in with a review follow-up (6996b1f9: the wire-answer parse under test, a deadline on the poll, the resolve() doc). Closing, since a hand merge is not marked merged here.
ann closed this pull request 2026-10-17 14:58:29 +00:00
ann referenced this pull request from a commit 2026-11-09 18:41:19 +00:00
1.2.4: the README's version, figures and rig table, the changelog's section, the DOAP release, the library version answered (LibraryVersion), the regenerated HANDBOOK.md and docs/rigs.md for the tree to be tagged v1.2.4, a patch of the 1.2 line built on 1.2.3 (c95b3d9d): "mark as unread" (`chatlist mark_unread`, ChatEntry.marked_unread, synced on urn:tacky:chatunread:0), calls with peers that do not multiplex RTCP (interop #9 C36), retractions sealed under OMEMO 2 with the `retract_hint` setting (S14), the OMEMO version named in the stored XML (M27), the XEP-0492 attribute-free fallback on a scoped notification write (interop #1 C8) and the fallback body on sealed group-call invites; the host-visible changes listed first. Gate: unit on d6718717 plus these edits 8256 total, 0 failed on both media lanes (webrtc 8254 passed, 2 skipped; datachannel 8247 passed, 9 skipped); Rust 848 passed each; wasm, api.py check clean; audit clean against the advisory database of 2026-11-09 (d9cb059; RUSTSEC-2026-0119 and -0387 allowed by audit.toml); rigs three per server on 20ef05c2: Prosody 13 476 total, 437 passed, 2 failed, 37 skipped; ejabberd 26.09 476, 459 passed, 2 failed, 15 skipped; two per server on 20ef05c2: MongooseIM 6.10.0 476, 380 passed, 6 failed, 90 skipped; Openfire 5.1.2 476, 376 passed, 5 failed, 95 skipped. Two failures on every server were test_omemo2_interop's call invite cases expecting no fallback body, fixed in the suite by 4755cb89 (19 of 19 on all four servers at d6718717); the rest pass alone: MongooseIM test_groupcall 29 passed, 2 skipped, test_catchup_history 19 of 19; Openfire test_groupcall 30 passed, 1 skipped, test_jinglefile_jet2 2 of 2. Counted with those runs: Prosody 439/0/37, ejabberd 461/0/15, MongooseIM 386/0/90, Openfire 381/0/95. The two unit failures of an earlier lane run (test_storage's burst cases sharing a temp file between lanes) fixed in the suite by f7de7c20; coverage kept from 1.2.0 (f5483b52: Tcl 99.0 % procs, Rust 99.2 %, C 98.8 % lines), not re-measured.

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
another-im/libtacky!9
No description provided.