134 Commits
Author SHA1 Message Date
yibaiba 8b631f12f1 fix: separate UDP health from VoWiFi gating 2026-09-12 22:37:08 +08:00
yibaiba 4852c7d337 fix: verify SOCKS5 UDP relay traffic 2026-09-12 20:57:12 +08:00
yibaiba 63c4b2743e fix(dashboard): keep runtime VoLTE phone mode on home cards
Dashboard overwrote worker config with yaml, so Unicom native VoLTE lost
phone_mode and rendered as VoWiFi. Take policy from runtime, attach
native_volte, and merge the same fields from the device list.
2026-09-09 23:25:21 +08:00
yibaiba 31c055c3b4 fix(web): show native VoLTE path on the dashboard
When phone_mode is volte, the home focus uses SIM/LTE/PDN/IMS/Voice instead of the unused VoWiFi stages.
2026-09-09 22:58:14 +08:00
yibaiba b8e470e3d7 fix: scope PCSC PIN retries to the current SIM 2026-09-09 20:11:50 +08:00
yibaiba 5b2aa762a5 docs: expose VoWiFi MO SMS readiness in OpenAPI 2026-09-09 10:20:58 +08:00
Ray e6dd3a06f9 fix(ims): allow MO SMS without port-s receiver 2026-09-08 20:52:11 +08:00
yibaiba 02c9d7a28d 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 c9a63731a9 fix(sms): locate notification messages outside inbox windows 2026-09-06 23:49:47 +08:00
yibaiba 1cfc0d3d95 feat(sms): add global inbox notifications and unread count 2026-09-06 23:27:22 +08:00
yibaiba 34e5bdf959 fix: harden VoWiFi proxy recovery handling 2026-09-05 17:25:45 +08:00
yibaiba a6f43a2ea9 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 3585faf899 fix: keep contact groups consistent across pages 2026-09-04 21:00:20 +08:00
yibaiba 4fb699f446 fix: harden IMS recovery and contact updates 2026-09-04 20:13:35 +08:00
yibaiba eea9a22edd fix: preserve contact identities and VoWiFi health timing 2026-09-04 18:01:57 +08:00
yibaiba 6970335f50 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 dede511355 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 40eaeba7a7 fix(phone): harden IMS recovery and contact identity state 2026-09-04 13:26:21 +08:00
yibaiba 2efb9cabe7 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 870e1c73a1 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 261102cbad feat(vowifi): track WiFi Calling health 2026-09-04 11:37:16 +08:00
yibaiba 91b01d8621 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 3b1aa9bf3a fix(vowifi): restore runtime boundary test coverage 2026-09-03 18:21:25 +08:00
yibaiba 84ebdc8eab 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
yibaiba bf433ea45b 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 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
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 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
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 aaf774b8bc feat(esim): decode activation QR images and PDFs on the server
Upload screenshots or carrier PDFs to decode LPA:1$ payloads so install
no longer depends on the browser BarcodeDetector API.
2026-08-27 18:39:03 +08:00
yibaiba e44e1e4323 fix(esim): decode dropped or pasted QR images and keep LPA tokens
Prefer LPA payloads over labeled SM-DP+ text, fall back to the form
host when an activation blob does not parse, and accept QR screenshots
via drag-and-drop or clipboard paste.
2026-08-27 18:18:26 +08:00
yibaiba 14a66303e4 fix(esim): install profiles from market QR activation codes
Accept GSMA LPA:1$ payloads, Apple-wrapped URLs, host$token strings,
and labeled SM-DP+/activation-code emails so VOXI, Giffgaff, Airalo
and similar cards can be added from the QR rather than a bare host.
2026-08-27 17:35:55 +08:00
yibaiba d0e15a913e test: replace live modem IMEIs with fictional fixtures
Keep the same pairing and 14-digit prefix behavior, but stop using
real module identities in Go tests.
2026-08-24 18:53:10 +08:00
yibaiba 45d203b4f9 fix(phone): always publish call_ended after hangup
Hangup could return 204 while native VoLTE never emitted CallEnded, so
the page stayed on 挂断中. Finish the phone-layer call after a successful
hangup or reject, replay events when after_id is from a previous process,
and apply restarted SSE ids instead of dropping them.
2026-08-24 18:21:49 +08:00
yibaiba b5e785f32a fix(volte): stop treating native mode as WiFi calling
Card policy already stored phone_mode=volte with airplane off, but the
embedded UI still classified any non-cellular mode as WiFi calling and
locked flight. Device list also dropped PhoneMode when merging yaml.
2026-08-24 15:04:24 +08:00
yibaiba aea62a5e6d fix(volte): project RF on enable and skip missing usbcfg
Why: live Enable on 179 failed twice: volte PATCH left CFUN=4 so CEREG stayed 0; CU-VoLTE MBN returns ERROR for AT+QCFG usbcfg and aborted identity.

Why this works: enabling native VoLTE now applies card policy so camped modes leave airplane. Provision continues IMS when usbcfg is unsupported and does not demand UAC bits.

Remaining: redeploy to 179 to register Unicom IMSA; no real call yet.
2026-08-24 14:37:04 +08:00
yibaiba 74539c0994 refactor(volte): collapse phone policy and share G.711
Why: quality review found triplicate radio policy, untyped native_volte, duplicated mu-law, and IMS lifecycle buried in manager.go.

Why this works: camped modes share PhoneModeCampsOnCell and applyPhoneRadioPolicy; DeviceStatus.NativeVoLTE is volte.Status; PCM bridge calls phone G.711; IMS clients live in ims_clients.go. VoWiFiEnabled JSON/DB name is unchanged.

Remaining: live IMS/UAC still wait on a China VoLTE SIM; AudioRuntime stays unwired until helper audit; Enable half-applied rollback is not in this change.
2026-08-24 10:20:50 +08:00
yibaiba 855e6a4a63 fix(volte): address native call and enable review bugs
Reuse of QMI call ids, inbound PCMU SDP, IMS client leak,
Lebara live classify, and VoLTE policy mirroring.
2026-08-24 10:00:17 +08:00
yibaiba e550d2edd5 feat(volte): add native VoLTE phone mode on QDC507
Keep wifi and cellular software IMS. VoLTE camps LTE, enables
modem IMS over AT, and routes /phone through QMI VOICE.
2026-08-23 21:55:46 +08:00
yibaiba 38fa4d9d74 fix(sms): wait for VoWiFi recovery before sending 2026-08-20 14:59:41 +08:00
yibaiba 5189749948 fix(notify): restore proactive personal Weixin delivery 2026-08-19 17:52:33 +08:00
yibaiba 7a07c18b24 fix: enforce Lebara UK radio lock safely 2026-08-19 15:43:18 +08:00
yibaiba d22874111d feat: add Lebara UK NextGen WiFi calling and radio lock
Add the 234/87 preset and keep shared eSIMs off domestic cells so a dual-IMSI flip to 20404 cannot kill UK WFC.
2026-08-19 14:58:04 +08:00
yibaiba c3e8e8539f fix: preserve notification binding and DNS state 2026-08-19 12:20:40 +08:00
yibaiba 84b86ecccd fix: put SOCKS5 keepalive and Feishu binding on the right layers
Move UDP associate keepalive into Socks5Transport, reuse staged ePDG DNS with cache only after timeout, and share one trusted Feishu binding helper.
2026-08-19 11:50:11 +08:00
yibaiba e7b6f8a051 fix: authorize Feishu chats and refresh bound notification IDs
First Feishu private chat now binds the sender, later group messages
require that user, and QR apply records the scanner Open ID. Settings
polling merges bound IDs without wiping in-progress form edits.
2026-08-19 11:24:00 +08:00