433 Commits
Author SHA1 Message Date
BFNOC a1374ccf7d fix(esim): abort a switch to Lebara UK when the radio cannot be turned off
- Return the radio release error from releaseRadioBeforeSwitch
- Report the mode read back after a failed release
- Abort the switch to a Lebara UK or unclassified target when the radio stays on
- Keep a failed RadioCycle release of other cards logged and switching
2026-11-27 19:54:52 +08:00
BFNOC 9332c09bc7 fix(esim): abort the switch when the old VoWiFi task has not stopped
- Run onBeforeSwitch before the first SIM access and let it return an error
- Stop VoWiFi before any switch state, identity or radio change
- Bound the pre-switch VoWiFi stop
- Clear only the switch state when a switch is aborted
- Pass AID lookup and LPA open failures to the failure callback
- Return 409 when a switch is aborted for the old VoWiFi task
2026-11-27 18:36:09 +08:00
BFNOC 8411a8b7e3 fix(vowifi): keep the modem until the old VoWiFi runner exits
- Keep the instance while its runner has not exited and remove it after exit
- Report local cleanup failures after a completed handover
- Leave SMS mode and radio for a later disable while the runner has not exited
- Refuse to start or recover VoWiFi while the old runner is still exiting
- Log when a cancelled VoWiFi start has exited
- Release a failed runtime once and keep its instance until the runner exits
- Stop restart and recover on teardown errors
- Stop waiting for the previous lifecycle command at the caller's deadline
- Bound only the queue wait of a restart
- Add StopOrDrain for callers that must not disable an idle device
- Bound the wait for the old task in disable, removal, SIM change, native voice and cellular idle
- Abort RebuildWorker while the old VoWiFi task is running
- Stop VoWiFi and recheck the Worker before a manual modem reset
- Stop a start that turns stale after it was claimed
2026-11-27 18:36:09 +08:00
yibaiba 8a1c29d85f Merge pull request #118 from ilazycat/ml307-support
Preserve the AT-only QMI capability check from #117 when validating phone mode policy, with regression coverage for rejected policy mutations.
2026-11-23 18:37:06 +08:00
yibaiba 663244c44e Merge pull request #117 from SmartElec/fix/at-backend-voice
Preserve verified idle handoff from main; reject missing IMS media, retain recovered audio ownership, and keep waiting and held calls off the audio route.
2026-11-23 18:28:21 +08:00
Jiahui Zhu efe03c30c8 fix(esim): reload switched ML307C profiles with RF off 2026-11-20 13:38:09 +08:00
Jiahui Zhu 6b726fdb83 docs(api): document native voice availability reason 2026-11-20 12:51:22 +08:00
Jiahui Zhu 8eb1bf4c94 fix(modem): retry a missing startup IMEI reply 2026-11-20 12:51:22 +08:00
Jiahui Zhu dccf97b141 chore: simplify SMS dispatch and phone test assertion 2026-11-20 12:51:22 +08:00
Jiahui Zhu 04bcac76e7 fix(sms): preserve the selected SIM through submission 2026-11-20 12:51:22 +08:00
Jiahui Zhu ffb5cbceee fix(phone): enforce capability for automatic cellular dialing 2026-11-20 12:51:22 +08:00
Jiahui Zhu 984c4d199d fix(sms): verify each fragment before cross-SCTS recovery 2026-11-20 12:51:22 +08:00
Jiahui Zhu 0c56e920b2 fix(phone): reject cellular IMS without a modem data path 2026-11-20 12:51:22 +08:00
Jiahui Zhu da22cc7a2f fix(sms): match stored multipart pieces by PDU fingerprint 2026-11-20 12:51:22 +08:00
Jiahui Zhu fea491cd65 fix(device): converge strict SIM identity before using the card 2026-11-20 12:51:22 +08:00
Jiahui Zhu f2cf1c9f3b fix(sms): isolate store failures and recheck deletion receipts 2026-11-20 12:51:22 +08:00
Jiahui Zhu f134a02ae6 fix(device): verify IMEI on the opened AT runtime port 2026-11-20 12:51:22 +08:00
Jiahui Zhu 12519e481f fix(device): confirm SIM PIN state before retiring phone runtimes 2026-11-20 12:51:22 +08:00
Jiahui Zhu fd81d9c5e0 fix(sms): preserve AT inbox provenance and durable deduplication 2026-11-20 12:51:22 +08:00
Jiahui Zhu 332f2ea246 fix(sms): require observed groups for cross-SCTS recovery 2026-11-20 12:51:22 +08:00
Jiahui Zhu 63667bc7e0 fix(device): select the AT profile for legacy port bindings 2026-11-20 12:51:22 +08:00
Jiahui Zhu 60658cb4be fix(phone): restore WiFi using the effective card policy 2026-11-20 12:51:21 +08:00
Jiahui Zhu 8e80bf7ad3 refactor(phone): validate the effective phone mode 2026-11-20 12:51:21 +08:00
Jiahui Zhu 096f01d079 fix(device): retire only the matching SIM event timer 2026-11-20 12:51:21 +08:00
Jiahui Zhu 289106b9a4 refactor(device): centralize AT device and stored inbox rules 2026-11-20 12:51:21 +08:00
Jiahui Zhu c0c734a9e1 fix(device): keep SIM prewarm tied to its worker 2026-11-20 12:51:21 +08:00
Jiahui Zhu e15777e730 refactor(device): unify AT discovery and identity rules 2026-11-20 12:51:21 +08:00
Jiahui Zhu 2a07886473 refactor(device): use a common AT SMS scan entry point 2026-11-20 12:51:21 +08:00
Jiahui Zhu 2a64ac7e13 fix(api): keep SMS result writable after modem waits 2026-11-20 12:51:21 +08:00
Jiahui Zhu 279ed863c2 chore(device): raise default device limit to ten 2026-11-20 12:51:21 +08:00
Jiahui Zhu 54ab14f5f3 fix(sms): recover stored messages and reassemble settled fragments 2026-11-20 12:51:17 +08:00
Jiahui Zhu acc9a2dcd5 fix(device): keep ML307C rediscovery bound to live identity 2026-11-20 12:51:17 +08:00
Jiahui Zhu 8ec95cb0b2 fix(sms): retain uncertain results in command and balance flows 2026-11-20 12:51:17 +08:00
Jiahui Zhu 60ef3172b8 refactor(modem): centralize AT dialect configuration 2026-11-20 12:51:17 +08:00
Jiahui Zhu e54a06cb26 fix(esim): scope bare channel responses to ML307C 2026-11-20 12:51:17 +08:00
Jiahui Zhu 1648753e8d fix(sms): preserve unconfirmed submission outcomes 2026-11-20 12:51:17 +08:00
Jiahui Zhu a9791a220b fix(phone): report unsupported ML307C native voice modes 2026-11-20 12:51:17 +08:00
Jiahui Zhu 508fba4d30 fix(modem): keep ML307C SMS submission under one serial owner 2026-11-20 12:51:17 +08:00
Jiahui Zhu 9db03ed2db fix(modem): read ML307C firmware with MSWVER 2026-11-20 12:51:17 +08:00
Jiahui Zhu 30c055bedd fix(sms): persist ML307C stored messages before clearing slots 2026-11-20 12:51:10 +08:00
Jiahui Zhu 41a78ae1db fix(esim): accept ML307C bare logical channel responses 2026-11-20 12:37:59 +08:00
Jiahui Zhu 7e577d2793 feat(modem): support ML307C discovery and AT runtime 2026-11-20 12:37:58 +08:00
yibaiba ccdbf68a57 fix(volte): allow idle AT-only handoff after initialization failure 2026-11-19 23:34:34 +08:00
miaoguoqiang 1fc8790483 fix(phone): let a withdrawn waiting call be answered again
Hanging up the first call left the second one unusable in practice: the page
offered "恢复双向语音", restored audio, and the call was still not connected.
CLCC showed why — the waiting offer was withdrawn and the call alerted again
(state Incoming), but nothing told the application:

- the modem-voice host reported any non-active call of another line as
  "waiting", so the transition back to alerting was published as a media
  update and the browser never learned the call could be answered;
- the phone service ignored CallRinging for a call in "waiting", keeping that
  status forever;
- the page only offered answer buttons while the call had no media, so once a
  recovery had attached audio there was no way to answer it at all, and it
  offered media recovery for a call that was not even connected;
- answering it then failed before the modem was asked at all: the AT backend
  reports a line index, never an offer, so the waiting call had no SDP to
  attach and the phone service refused the empty one with "SDP has no usable
  RTP endpoint" — and rejected the call. Ask the backend first, which opens the
  endpoint while answering, and attach the offer it hands back.

Mapping the state, accepting the ringing transition, offering 接听/仅听接听 for
ringing and waiting inbound calls and letting the backend negotiate their media
makes answering possible again (AT+CHLD=2 for a waiting call, ATA otherwise).
2026-11-18 13:31:22 +08:00
miaoguoqiang d85b1177e0 fix(phone): make a call the modem answered on its own controllable
Hanging up the active call while another one waits sends AT+CHLD=1<idx>, which
per 22.030 also accepts the waiting call. That second call was never answered
through Answer, so nothing opened an audio path for it and no browser owns it.
Recovering it failed five ways:

- the media refresh compared the caller's lease against an empty one and
  refused with "control lease does not own this call", so the browser could
  never attach; an unbound call has no owner to protect and the first browser
  to attach should take it, exactly like answering a ringing call;
- there was no endpoint to attach to, because a call the modem answered on its
  own never exchanged an offer; let the backend open one and hand its offer
  back, then attach to it;
- the phone service only reaches that hook through the gateway mux, which did
  not expose it, so the endpoint was never requested and the browser kept its
  "call media endpoint is not negotiated yet" failure;
- a call can own an endpoint without a bridge (ringing, or activated outside
  Answer), and the media update rejected exactly that case with "模组直拨音频
  尚未连接". Open the missing bridge on the endpoint the browser already
  attached to, and keep a held call from opening a second hardware route;
- the hangup confirmation read CLCC once, right after the command, when the
  modem had not published the removal yet, and reported "挂断命令已发送,但模组
  仍报告通话存在" for a hangup that had in fact worked. Poll for a short while
  before believing it.
2026-11-18 13:15:32 +08:00
miaoguoqiang 22fbbdcf64 fix(phone): keep shared media alive and let unbound calls be hung up
With call waiting, one browser owns one media session and both calls share it.
Ending the first call removed that session unconditionally and cleared the
browser's lease, so the waiting call could no longer be hung up (403 control
lease does not own this call) or rejected (403 invalid media control lease).

- release the media only when no other live call still binds it;
- allow hanging up a call that no browser has bound yet (a ringing inbound
  call has no lease to compare against);
- allow rejecting such a call even when the caller's media is already gone,
  because dropping a ringing call needs no audio path.
2026-11-18 12:51:44 +08:00
miaoguoqiang b18c9017c7 fix(volte): report the missing QMI instead of asking for a modem restart
Enabling VoLTE on a device without QMI ran the AT provisioning pass first: it
wrote UAC/USB settings into the module and set reboot_required, so the page said
"restart the modem" while the actual blocker was the absent QMI. The settings
stayed written for nothing, and restarting never helped.

Refuse before provisioning when the host cannot carry voice over QMI, clearing
any stale reboot flag. On the web side a failed phase now wins over a leftover
reboot_required, so the real error is what the operator reads.
2026-11-18 12:51:43 +08:00
miaoguoqiang fc3b54863b fix(volte): refuse VoLTE on a device without QMI and drop the idle session
Native VoLTE is driven over QMI: the IMS clients, the IMSA registration
subscription and VOICEDial all live there. An AT-only device (ECM mode, no QMI)
has none of that, but two paths still pretended otherwise.

Enabling VoLTE answered "VoLTE 已设置" with a 200, wrote the mode into the card
policy, and only then failed inside the enable pass, so the page showed a
success message and quietly kept the previous mode. Refuse the request up front
and say why, leaving the card policy untouched.

The handoff to modem voice always reconciled call state through QMI, so a
session left behind by the earlier enable attempt made the switch fail with
native_volte_stop_failed. That session never owned any QMI call state; drop it
instead of reporting a failure the operator cannot act on.
2026-11-18 12:51:39 +08:00
yibaiba d5dcae677f Merge pull request #116 from yuyanmengxuan/codex/fix-vowifi-sms-smsc-reassembly
Codex/fix vowifi sms smsc reassembly
2026-11-17 19:57:18 +08:00
yibaiba 25e3bc35d3 refactor(modemvoice): simplify targeted call control helpers 2026-11-17 16:27:01 +08:00