Repository navigation
omamobile-mmd 0.1.3: wait for confirmed call release - #461
Conversation
Keep live calls visible until the modem reports termination, propagate hangup failures, and avoid duplicate release requests. Cover delayed replies and client deletion races.
Retry connection refusal while the test bus starts, and clean up the daemon when startup fails. Exercise delayed readiness and failure paths.
|
Thank you, @W4HO-ham. Keeping the call until sitd reports it terminated, and returning hangup failures to the client, is the right behaviour, and the tests cover the awkward cases well (a late reply, a confirmation before the reply, deleting after Since this is still a draft, a few notes for when you take it out:
Versions are mine at merge: the #371 stack also uses omamobile-mmd 0.1.3, so whichever lands second gets the next number. |
…ete completes sitd drops a call only after it has ended (delete-call needs terminated, and a restart restores live calls), so a call that disappears while a hangup is pending is over: mark it terminated and complete the client's Delete, instead of answering Failed and leaving the object Active until mmd restarts.
|
Thanks. On the call that disappears from sitd: you're right, sitd drops a call only after it has ended (
The real call on the 9a is still owed; the palmtop is in a suspend series today, so it comes after. |
|
Thank you, @W4HO-ham. fa87b08 is exactly what I hoped for: a call sitd no One more question while this is a draft, before I try it on the 7 Pro. A tiny one: fa87b08 dropped the blank line before The rest stands as before: your real call on the 9a, then mine on the 7 Pro, |
The releasing flag held for the rest of the call once a hang-up had failed or its confirmation had timed out, so a second press of the red button answered InProgress and the call ran on until the far end hung up. Now the flag clears when sitd answers the hang-up with an error and when the 20 s confirmation runs out, so each new Hangup, DeleteCall or HangupAll from the user is a new attempt, while the bridge still never retries on its own and still refuses a second hang-up while the first is outstanding. The cached error goes with it: the pending Delete gets its error directly. The tests say so, and the blank line before the confirmation-before-reply test is back.
|
Agreed, and done at c9619cc: |
|
Thank you, @W4HO-ham, that was quick. A refused hang-up now leaves nothing One more question while this is a draft, about the timeout half. Only Could A tiny test note: the refusal test's last step says "once sitd takes it, the The rest stands: your real call on the 9a, then mine on the 7 Pro, and the |
…All says when it skipped one sitd answers a hang-up as soon as it has sent the release, and its own deadline then turns the radio off and keeps the call, so a release that was accepted but never completed left Call.Hangup blocked for the rest of the call. Now every hang-up, from Hangup, DeleteCall or HangupAll, holds the releasing flag for 20 s at most (one timer per call, ended by a reply, a terminated call or the call's deletion), after which a new press from the user is a new attempt; the bridge still never retries on its own. HangupAll answers InProgress instead of success for a call it skipped because its release is outstanding. The refusal test ends with the call terminated and gone, and a new test walks an accepted, unconfirmed hang-up through the window.
|
Done at 5359a66, the first way: every hang-up now opens the same 20 s window, whichever method sent it. |
… as the 9a's attach check expects it)
|
Thank you, @W4HO-ham. All three points are in, and I like how it came out: One thing I should have looked up myself last time, about what the second The rest stands: your real call on the 9a, then mine on the 7 Pro before it |
…nd test it With today's sitd a hang-up whose call never ends doesn't reach the bridge's 20 s window: sitd's own 12 s deadline turns the radio off and stops it for an attended reboot, the bridge withdraws the modem with its calls, and the next press finds no call object, so the modem never gets a second hang-up. The window is for a sitd that stays up. The comment and the two tests whose stand-in sitd stays up now say so, and a new test stops the stand-in after the first hang-up.
|
You're right, and it goes one step further than a closed socket. I read In
|
|
The real call on the 9a (2026-11-09, 19:27 MST; and the bridge's own log: What I can't give you tonight: the owner saw the palmtop's screen show the call being answered, but didn't listen or note what his phone showed at the end, and the hang-up was from the palmtop's side only. A hang-up from the far end, and the Phone app's own buttons instead of D-Bus calls, are still to do. I didn't try to provoke the unconfirmed release. |
|
A second Pixel 9a, with real calls on a Luxembourg carrier (VoLTE), 2026-11-10. Setup:
I (the owner) used the phone's own Phone app by hand. The agent read the journal afterwards. 1. Incoming call, hung up on the 9a: 2. Outgoing call, the other side hung up: Audio was fine both ways in both calls. The bridge and sitd logged no errors, no "went away" and no recovery. The call card closed on its own each time. Not reproduced: an unconfirmed release. For the record, one happened on this phone earlier the same day with the packaged bridge, after a different failure: an incoming call at 11:00, 1 h 17 min into a boot, where the modem refused every |
|
Thank you, that covers the two cases I still owed here: a hang-up from the far end, and the Phone app's own buttons used by hand. Both on a second 9a and another carrier, with the call card closing by itself each time. So the record for this branch is now: on my palmtop an incoming call answered and hung up locally, with a second Hangup answered "This call has ended"; on yours an incoming call hung up locally and an outgoing call ended by the other side, audio both ways. No unconfirmed release on either with this bridge. The 11:00 call where the modem refused every |
|
Thank you, @W4HO-ham, and thank you, @den-kloot, for the calls on a second The last commit says what I asked for. The docstring, the commit message and The checks pass on this head and it merges cleanly onto today's main. @den-kloot, the 11:00 call where the modem refused every What's left is mine: one call each way on the Pixel 7 Pro, since the bridge |
|
My call on the Pixel 7 Pro is done, 2026-11-10: this head merged with today's main,
No traceback, no unconfirmed release, no radio-off in the bridge's or sitd's log. One thing I ran into, not caused by this PR: building the package on the phone, That was the last open point on my side. When you take it out of draft I'll merge it; the version is set at merge (0.1.4 if this lands before #380, otherwise 0.1.5), and I'll fix the title's number then. |
|
Thank you for the two calls. It is out of draft. The |
|
Thank you, @W4HO-ham, for taking it out of draft, and for #638. I've been Nothing is left here. The head is the one I tested on the Pixel 7 Pro this Merging as |
Three tests in test_bridge.py waited for a property and then read the client's recorded signals at once. A property read can return before the main loop has delivered the signals sent with it, so on a slow machine (seen building the package on a Pixel 7 Pro, #461) test_sim_appears_later saw one InterfacesAdded of four and test_enable_goes_to_sitd_radio raised IndexError. Each now waits for the signal it checks, through one helper. Tests only, no version change.
…kross#461) A hang-up no longer removes the call object when sitd accepts the request: the call stays until sitd reports it terminated or stops listing it, each hang-up gets one 20 s release window, and Hangup and HangupAll answer InProgress while one is outstanding. A refused or unconfirmed hang-up lets the user try again, and when sitd goes away the modem and its calls are withdrawn. Tested with real calls on two Pixel 9as and on a Pixel 7 Pro on 2026-11-10 (an outgoing call hung up locally, an incoming one hung up by the far end).
…ross#638) Three tests in test_bridge.py waited for a property and then read the client's recorded signals at once. A property read can return before the main loop has delivered the signals sent with it, so on a slow machine (seen building the package on a Pixel 7 Pro, derekross#461) test_sim_appears_later saw one InterfacesAdded of four and test_enable_goes_to_sitd_radio raised IndexError. Each now waits for the signal it checks, through one helper. Tests only, no version change.
Deleting a live call currently removes it and reports success even if the modem has not confirmed the hangup. Keep the call visible until sitd reports termination, return failures to the client, and avoid sending another hangup while release is pending.
The tests cover delayed replies, failed hangups, timeouts, disappearing calls, service loss, and GNOME Calls deleting an ended call immediately. They also wait for the private D-Bus socket to start listening, fixing an intermittent connection refusal found under load.
The package tests passed on the palmtop using a private bus and simulated modem; the ModemManager 1.24.2 API comparison passed against its upstream XML. The same call changes also passed simulated mmcli, GNOME Calls, and Chatty checks on the MMS stack. The updated bridge is running on the palmtop with the modem and sitd left online; a real carrier call has not yet been tested.
Both GitHub CI checks pass. A separate full package run on maclab found the D-Bus test race fixed here and an unrelated speaker-tuning import failure with Python 3.14's installed
testpackage. The corrected modem package suite and a deliberately delayed D-Bus startup both pass on maclab.What a hang-up that never completes meets today: omamobile-sitd answers the request as soon as it has sent the release, and when the call is still there 12 s later its own deadline turns the radio off and stops sitd for an attended reboot (
unconfirmed_release()in omamobile-modem-sit). The bridge then withdraws the modem with its calls, so a second press within the bridge's 20 s window isInProgress, and after sitd has stopped there is no call object left to press on: the modem never gets a second hang-up. The 20 s window and the "a new press is a new attempt" behaviour apply to a sitd that stays up with the call still there; the tests cover both (a stand-in that stays up, and one that stops after the first hang-up).