Commit Graph
239 Commits
Author SHA1 Message Date
yibaiba d8f2dd6cdb fix: preserve historical SMS unread state and IMS recovery attempts
Mark historical SMS windows by exact message IDs while retaining the latest-thread watermark API. Validate message ownership and update persisted unread counts atomically.

Match IMS recovery completion to the registered path and failure generation so stale REGISTER/downlink success cannot erase replacement backoff or Retry-After.

Validation: 294 frontend tests, typecheck, targeted lint, SMS backend tests, and IMS/runtime race checks passed. Added regression coverage for both failures; live carrier integration was not run.
2026-09-07 10:45:12 +08:00
yibaiba 87be39230b fix(sms): locate notification messages outside inbox windows 2026-09-06 23:49:47 +08:00
yibaiba 324915fbca feat(sms): add global inbox notifications and unread count 2026-09-06 23:27:22 +08:00
yibaiba 72820aeb19 fix: preserve VoWiFi retry runtime state 2026-09-05 21:37:04 +08:00
yibaiba 604ca53312 fix: harden VoWiFi proxy recovery handling 2026-09-05 17:25:45 +08:00
yibaiba f8e16e7246 feat(vowifi): let cards pin or randomly pick country proxy nodes
Allow multiple upstream proxies per country, card-level pin or
direct override, and restart WiFi calling when the route changes.
2026-09-05 16:32:58 +08:00
yibaiba 2eb8b233e6 fix: bound WiFi Calling event history 2026-09-05 11:16:17 +08:00
yibaiba 79e44bd0e7 fix: keep contact groups consistent across pages 2026-09-04 21:00:20 +08:00
yibaiba ce25e7e427 fix: harden IMS recovery and contact updates 2026-09-04 20:13:35 +08:00
yibaiba 562023b4fb fix: preserve contact identities and VoWiFi health timing 2026-09-04 18:01:57 +08:00
yibaiba 27f3e79c84 fix(vowifi): measure health from SMS readiness 2026-09-04 17:19:04 +08:00
yibaiba 1e4a1c86f9 feat(phone): page contacts and load more on scroll
Add limit/offset listing, keep search by loading remaining pages,
and leave a short drag-import hint in the contacts drawer.
2026-09-04 16:47:30 +08:00
yibaiba c9f2d7d3a7 feat(phone): import and export contacts from common phone books
Parse iOS, Google, Samsung, Xiaomi, Huawei, OPPO, and vivo vCard/CSV
exports, keep multiple numbers under one person, and add batch
import, export, delete, and drag-and-drop in the contacts drawer.
2026-09-04 15:53:34 +08:00
yibaiba 826e5c1b49 fix(phone): harden IMS recovery and contact identity state 2026-09-04 13:26:21 +08:00
yibaiba 527ecd4bd0 fix(ims): recover early port-s resets and coalesce native VoLTE starts
Track port-s open/close and peer RST, switch P-CSCF with a full security
agreement teardown after Vodafone UK early resets, and keep only one
native VoLTE start in flight per device.
2026-09-04 12:02:34 +08:00
yibaiba 69054c8beb feat(phone): add number geolocation, notify attribution, and contacts list
Embed CN phone.dat plus libphonenumber for country/carrier lookup, show
that on SMS/call notifications, and list saved contacts on the Phone page.
2026-09-04 11:55:06 +08:00
yibaiba c753d7897c feat(vowifi): track WiFi Calling health 2026-09-04 11:37:16 +08:00
yibaiba 7aa1ab75c7 feat(phone): show caller carrier/region and save contacts
Incoming calls and the call log resolve 10086/10010 and mobile
prefixes to 中国移动/中国联通, plus country for international
numbers. Names saved as contacts replace the raw number on screen.
2026-09-04 11:18:54 +08:00
yibaiba 46f1892de0 fix: harden modem and IMS recovery 2026-09-04 09:05:21 +08:00
yibaiba 2843916a5e fix(vowifi): order IMS and SMS readiness events 2026-09-04 08:09:04 +08:00
yibaiba 6b820454b1 fix(volte): keep host off the LTE internet PDN when 网络 is off
Native VoLTE still has the operator default 3gnet bearer for LTE
attach; that cannot be CGACT-deactivated. Hideck must not use it as
usbnet. Always flush/down the data iface when NetworkEnabled is
false, including after IMS PDN comes up.
2026-09-03 20:13:12 +08:00
yibaiba 869ff5791a fix(qmi): unstick wedged CTL after SIM swap without CFUN
SIM swap can leave qmi_wwan/qmi-proxy holding a dead cdc-wdm
session while AT still works. Recovery then kept allocating CTL
clients on that wedged port. Prefer AT IMEI during rescan, skip
startup UIM reset when the card is already ready, and if CTL
allocate times out twice with AT alive, USB-reset only that modem.
2026-09-03 19:56:46 +08:00
yibaiba 8e81aa811d fix(qmi): keep StartCore retry and read SIM over AT
QMI DMS allocate timeout after SIM swap was tearing down the worker
because identity refresh only used QMI and recovery treated empty
identity as half-ready. Leave the worker running while StartCore
retries, and read IMSI/ICCID from the AT port so card policy can
apply without a CFUN reboot.
2026-09-03 19:40:08 +08:00
yibaiba 9f02f4ec0f fix(qmi): rebuild after qmi-proxy pipe break on SIM swap
Modem reboot leaves the proxy socket dead while NAS reconcile stays
in flight, so health checks never reopen QMI. Treat that broken pipe
as transport-down, keep AT VoLTE when IMS client allocate fails, and
fall back to AT+CNUM for the local number.
2026-09-03 19:18:27 +08:00
yibaiba db27a000fa fix(vowifi): restore runtime boundary test coverage 2026-09-03 18:21:25 +08:00
yibaibaandCursor b414f1e135 fix(phone): stop incoming ringing after remote hangup
Map QMI disconnecting and early CANCEL/BYE to a missed call, and use standalone titles so WeCom, QQ, Feishu, and other channels no longer stack 通话结束.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-01 16:21:11 +08:00
yibaiba 9d3e0d06a7 fix(esim): recover Lebara UK 204/04 identity without deleting the profile
When a Lebara UK eSIM flips to 20404, reset the same ICCID with Disable/Enable or a parking profile, wait for a stable 23487 IMSI, then start VoWiFi. Keep the RF lock. Do not start VoWiFi during recover or on classify-failure for unrelated cards.
2026-09-01 16:09:07 +08:00
yibaibaandCursor 272c5dbdce feat(vowifi): add Hotlink, AIS, Smart, Globe, KPN and MTN presets
Match home PLMN for travel eSIMs that publicly offer 3GPP Wi-Fi Calling, without guessing balance shortcodes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-01 15:46:07 +08:00
yibaibaandCursor 946d66b1cd feat(vowifi): add common travel eSIM carrier presets
Match popular voice eSIMs by home PLMN, including EE, Lycamobile, Japan MNOs, CMHK, and Estonia Elisa for 乌龟卡.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-01 15:32:17 +08:00
yibaiba 7ae34939ed fix(volte): hold and resume native calls over QMI
Native HoldCall/ResumeCall were stubs. Send VOICE_MANAGE_CALLS
HOLD_ACTIVE_ACCEPT_WAITING_OR_HELD, then local hold/unhold if the
modem rejects the network supplementary service.
2026-09-01 14:45:55 +08:00
yibaiba 54ebcb3690 fix(volte): skip unusable UAC and keep China SIMs on native IMS
DJI/Baiwang USB audio enumerates but opening PCM kills QMI on the
same composite. Skip QPCMV and ALSA there; QPCMV failure also skips
PCM open. Working UAC is unchanged. China MCC 460/461 force native
VoLTE. Rebuild QMI when the proxy socket dies during a native call.
2026-09-01 14:22:20 +08:00
yibaiba 053f94eb2f Merge pull request #3 from rayyume/fix/webrtc-public-host-candidate
fix(phone): preserve fixed WebRTC UDP port in public ICE candidate
2026-09-01 13:04:37 +08:00
yibaiba 3f7d232af4 fix(device): retry native VoLTE start and show LTE RSRP
Why: a transient AT/QMI timeout aborted native IMS provision, and QMI LTE placeholder RSSI made the overview look like there was no signal.

Why this works: native VoLTE start retries timeout-class errors, serializes AT on one port, and the overview uses RSRP when RSSI is a sentinel. Shutdown now takes the stop context so IMS can finish Contact Expires=0.

Remaining: Lebara UK RF-lock and unique-MBN failures stay non-retryable.
2026-09-01 12:26:37 +08:00
yibaiba 40dbc7cf31 feat(ut): add Vodafone xcap PDN and hide 呼叫设置
Why: Ut is HTTPS to an operator-internal IPv4 XCAP host, not SIP. IMS IPv6-only could not reach it, and CS-only devices still opened the page and waited on 502.

Why this works: Vodafone UK starts a second SWu session with APN xcap and omits INITIAL_CONTACT. Errors no longer leak the XCAP URL. The sidebar drops 呼叫设置; /ut redirects home.

Remaining: the xcap PDN gets IPv4, but TCP to the XCAP address still times out.
2026-09-01 12:26:23 +08:00
Ray 8c26a9ef8d debug: fix webrtc connection issue on cellular network 2026-09-01 08:46:54 +08:00
yibaiba 3264470acb feat(ut): start XCAP PDN after IMS and dial Ut through it
Why: DEV-20/21 still left StartAdditionalPDNs uncalled and Server.utClient unset, so the second SWu and Ut HTTP never ran on the production path.
Why this works: RunSession starts the xcap slot after IMS is up and waits for it without tearing down IMS on failure. Ut HTTP dials that PDN; a requested XCAP APN does not fall back to the IMS inner network. The API looks up the live runtime instance when utClient is not injected.
Remaining: live operator XCAP is untested; in-app browser MCP is still unavailable.
2026-08-31 15:24:57 +08:00
yibaiba 239feb172b feat(voice): keep two live calls and switch between them
Why: conference and ECT need more than activeCall plus a ring-only waitingCall; a second answered call was rejected as busy.
Why this works: occupancy is the live call map, capped at two, and a second call is allowed only after the first is connected. SwitchCall changes focus; hangup promotes the remaining call.
Remaining: inbound Replaces, conference, and ECT are still separate rows.
2026-08-31 14:26:12 +08:00
yibaiba c01e6e5126 feat(ut): configure simservs through XCAP instead of USSI
Why: IR.92 2.3.2 requires Ut/XCAP for call forwarding, identity restriction, and barring; MMI codes are not Ut.
Why this works: GET/PUT simservs uses If-Match and one service per request; 404 retries an alternate XUI; missing XCAP PDN returns a visible error.
Remaining: production still needs the XCAP PDN transport wired to the second SWu; browser evidence was not collected in this session.
2026-08-31 14:12:18 +08:00
yibaiba 5326e3c657 fix(device): cache SMSC across VoWiFi start and accept proxy errors
Why: a one-shot 5s SMSC read left later starts empty, and Darwin qmi-proxy errors hid a successful IMEI rebind.
Why this works: start retries the read, remembers the last IMSI/ICCID SMSC, and the bootstrap test accepts proxy-unsupported as a rebound start failure.
Remaining: preset SMSC fallback is still not a carrier-plan field.
2026-08-31 13:23:15 +08:00
yibaiba a0203084b0 feat(phone): map hold-unavailable and surface call waiting
Hold that is not aligned returns 503 with a Chinese message. A second
inbound CallWaiting stays in the active list and is shown on the phone
page and call bar.
2026-08-31 00:46:58 +08:00
yibaiba 24bb2e0072 fix(sms): send once via IMS or CS without a double submit
/send, automatic tasks, and the balance gateway now use SendRoutedSMS.
A VoWiFi failure falls back to CS once; it does not also send on IMS.
Notify /status shows MWI, and vocall hold from notify stays skipped.
2026-08-31 00:46:58 +08:00
yibaiba 49f97a50b5 feat(device): record VoWiFi MWI on runtime DTOs and teardown
Keep the latest RFC 3842 snapshot on the pool, attach it to device
runtime JSON, and clear it when VoWiFi is disabled. Call-waiting
notify is forwarded from the same dispatcher.
2026-08-31 00:46:58 +08:00
yibaiba 37ea2f75fd test(device): keep default new-card policy off the cellular radio
Bind and policy projection must stay in airplane / RF-off. Switching
that default into VoWiFi must not call ModeOnline or start IMS.
2026-08-31 00:46:58 +08:00
yibaiba 94b5ad8d66 fix(qmi): always open QMI backends through qmi-proxy
Unused control devices used to fall back to a raw open. On dual-module
hosts that lets the second card grab the fd, then UIM reset/AKA stalls
the modem. Discovery and runtime QMI both stay on the proxy.
2026-08-31 00:46:58 +08:00
yibaibaandCursor d36ebb08bc fix(device): keep cellular radio off when VoWiFi is the default
Default Wi-Fi calling was skipping bind-time RFOff and treating QMI LowPower as airplane, so the modem could camp after restart. Persist the flight mode and uncamp if NAS comes back while radio is suppressed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-29 11:51:23 +08:00
yibaibaandCursor 4ced58c4de feat(vowifi): align remaining IR.92 signaling and realtime AMR/EVS IO
Subscribe to MWI, accept in-dialog REFER and call waiting, and advertise
preconditions plus identity headers without enabling emergency calls.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-29 05:01:31 +08:00
yibaibaandCursor 916e4c40c4 fix(notify): give vocall hold and resume their own timeouts
The shared 8s context expired during the 3s hold pause, so resume
re-INVITE was cancelled and looked like a protocol failure.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 23:23:59 +08:00
yibaibaandCursor 593cb967bc feat(vowifi): close SMS, hold, outbound, and SWu protocol gaps
Register now advertises outbound, prefers Service-Route then Path, and
tears down RFC 3680 subscriptions in-dialog. Voice adds hold/resume and
RFC 4028 timers; SWu sends AKA' bidding, IKE fragmentation, redirect
limits, and a correctly coded AUTS. Host SMS gets SMMA backpressure and
CS fallback without double-send.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 23:19:43 +08:00
yibaiba b442567b6d fix(ims): advertise MSISDN-less SMS, 488 unmatched reports, and emergency ePDG
TS 24.341 5.3.2.6.2: REGISTER Contact includes +g.3gpp.smsip-msisdn-less so
future SIMs can use MSISDN-less SMS over IP.

TS 24.341 5.3.1.4.2: 488 when In-Reply-To is present and does not match a
submitted SM. Late reports still match the delivery store. RP-MR is not used
to steal another message when In-Reply-To is set.

IR.51: carrier profile now carries sos.epdg.epc.mncXXX.mccYYY.pub.3gppnetwork.org.
Ordinary VoWiFi IKE still uses the standard/custom ePDG.
2026-08-28 08:32:38 +08:00
yibaiba 1497cb5ae7 fix(qmi): stop and reap the spawned qmi-proxy with the service
Keep a single proxy child in the hideck cgroup, do not spawn another
when the socket is busy, and tear it down on shutdown so a restart
does not leave /dev/cdc-wdm busy.
2026-08-27 20:27:20 +08:00