195 Commits
Author SHA1 Message Date
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
Jiahui Zhu 6b726fdb83 docs(api): document native voice availability reason 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 0c56e920b2 fix(phone): reject cellular IMS without a modem data path 2026-11-20 12:51:22 +08:00
Jiahui Zhu 8e80bf7ad3 refactor(phone): validate the effective phone mode 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 2a64ac7e13 fix(api): keep SMS result writable after modem waits 2026-11-20 12:51:21 +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 7e577d2793 feat(modem): support ML307C discovery and AT runtime 2026-11-20 12:37:58 +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
BFNOC 2305ed458d feat(vowifi): reset the card's MWI backoff when MWI is turned on or re-detected
- clear only the card's MWI failure count and local wait, keeping network waits and stop states
- act only on a switch to on or the redetect button, not on saving on again
- reconnect or wake only running runtimes that hold the card, never start one
- reset in the host-held state before the hideck#101 reconnect
- wake the running runtime to re-check MWI when no reconnect is needed
- restart an MWI usage the SIM setting stopped once the setting allows it
- do a proxy change's reconnect first, then reset and wake without a second reconnect
2026-11-08 02:04:08 +08:00
BFNOC beabc334fe feat(vowifi): add a per-SIM voicemail indication setting
- Add mwi_mode to card policies with auto, on and off keyed by ICCID
- Add the ims_mwi_rejections table keyed by ICCID and IMS identity without expiry
- Implement the MWI policy store in the delivery store
- Accept mwi_mode in the card policy API and clear MWI rejections when it is set to on
- Restart WiFi calling after a clear or an explicit redetect so the live registration retries
- Keep mwi_mode edited during an automatic task when the task restores the card policy
- Add the voicemail indication select and redetect button to the card policy panel
- Handle every card_policy_saved_ error code like the restart failure
2026-11-05 11:15:40 +08:00
yibaiba 087afaf010 test(api): cover concurrent login lockout reservations 2026-10-29 16:34:45 +08:00
BFNOC 8845a93045 fix(api): lock out repeated failed logins
- Count only failed login and rotate attempts per IP
- Give back a successful attempt within its own counting window
- Lock an IP for 10 minutes once it reaches 10 failed attempts
- Return Retry-After on rate-limited login and rotate requests
- Prune expired IPs from the attempt map
- Log the lockout once and each failed rotate authentication
2026-10-29 14:10:33 +08:00
yibaiba 9fb465451b feat(mcp): add output contracts, workflow guidance and access diagnostics 2026-10-25 21:36:28 +08:00
yibaiba b7b38ea74b feat(mcp): allow permanent token deletion and audio cleanup 2026-10-25 20:33:09 +08:00
yibaiba 40ca0dfa81 feat(mcp): add business tools, token management and browser audio binding 2026-10-25 13:30:08 +08:00
yibaiba 99d67fc538 feat(phone): add call history deletion 2026-10-20 10:36:01 +08:00
yibaiba fe74628452 feat: support per-SIM local phone overrides 2026-10-20 09:04:29 +08:00
yibaiba 6da099ccae fix(audio): bound automatic-answer prompt decoding 2026-10-19 17:45:52 +08:00
miaoguoqiang 8cc2ceb172 feat(settings): 自动应答提示音支持多格式上传并统一转 8 kHz / 30 秒
共用播放录音原来只接受单声道 PCM16 WAV(8/16 kHz),用户手上的 AMR、MP3
或手机录的 44.1 kHz 立体声 WAV 都用不了。

- 上传白名单扩展为 WAV / AMR / AMR-WB / MP3,所有来源都走同一条转换链:
  解码 → 混单声道 → 采样率归一为 8 kHz → 超过 30 秒截断 → 写 PCM16 WAV。
  统一转换顺带让 44.1 kHz 立体声 WAV 这类"能解码但不符合播放要求"的文件可用。
- WAV 改用宽松解析(16-bit PCM、单/立体声、任意采样率);录音转 MP3 的路径
  仍用原来的严格解析,行为不变。
- MP3 用纯 Go 解码(新增 github.com/hajimehoshi/go-mp3,无 CGO)。该库只覆盖
  MPEG-1/2,8/11/12 kHz 的 MPEG-2.5 语音 MP3 返回明确中文提示引导转格式。
- 目标文件名强制为 .wav:旧配置若指向 .amr,解码会按后缀分派而失败。
- 前端 accept 与文案同步,按钮改为"选择音频"。

测试:立体声混音、44.1k→8k、16k→8k、40s→30s 截断、WAV 编解码往返,以及
环境变量驱动的真实 MP3 用例,RK3588 实机全过。
2026-10-19 17:41:16 +08:00
miaoguoqiang 326a9cd395 fix(phone): 媒体候选收敛到浏览器访问地址与物理网卡
同局域网通话时 ICE 曾选中公网 IPv6 或 docker/wwan 本地候选,媒体 rollover、
握手 9 秒或上行无声。两处收口:

- 按访问地址裁剪 answer:AccessHost 从 c.Request.Host 贯穿到 media session,
  resolveAccessHosts(IP/带端口/方括号 IPv6/域名 A+AAAA 2s 超时)+
  pruneAnswerCandidates 只保留地址匹配的 a=candidate 行;匹配为空保留全部
  (DNAT 场景仍走 webrtc_public_host)。
- 物理网卡收敛:pion 监听 :7580 时会自行枚举全部网卡,answer 裁剪管不到
  ICE agent 内部候选集。新增 physicalMux 重写 GetListenAddresses 只返回物理
  网卡地址(跳过 docker/br-/veth/tun/tap/wg/wwan/cni,IPv4 与 IPv6 都保留),
  过滤为空回退原列表。

实测:握手 9011ms → 214ms,媒体选中对稳定 local=192.168.3.30。
2026-10-19 17:33:29 +08:00
yibaiba 98cab4e769 feat: refine auto-answer settings controls 2026-10-16 10:28:21 +08:00
yibaiba cbe6e032e2 fix: make archived data cleanup race-safe 2026-10-16 08:53:14 +08:00
yibaiba e41b215538 [webdav-archive-cleanup-DOCS-01] docs: explain WebDAV archive safety 2026-10-16 00:46:27 +08:00
yibaiba 3085be575e [webdav-archive-cleanup-ARCHIVE-03] feat: schedule WebDAV archives 2026-10-16 00:32:17 +08:00
yibaiba 9a42ae2d57 fix: deliver automatic answer recordings safely 2026-10-15 18:38:55 +08:00
yibaiba a11a764ef1 feat: add per-device automatic call answering 2026-10-15 18:29:20 +08:00
yibaiba 01c6bb5009 feat: add generic webhook payload templates 2026-10-15 17:48:08 +08:00
yibaiba 162fbe280b fix: preserve restrictive notification filters 2026-10-15 16:59:31 +08:00
yibaiba d3f31e7bc7 fix: make managed device updates transactional 2026-10-15 16:54:11 +08:00
yibaiba 2eb385f952 fix: serialize device lifecycle mutations 2026-10-15 16:26:50 +08:00
yibaiba 05aac2bb70 fix: bind device actions to managed worker lifecycle 2026-10-15 15:38:58 +08:00
yibaiba 9cd2bfb740 fix: serialize operator and Lebara recovery ownership 2026-10-15 14:56:59 +08:00
yibaiba e8646132db fix: bind device mutations to worker lifecycle 2026-10-15 14:03:47 +08:00
yibaiba 31daeee945 fix: preserve notification channel settings and SIM context 2026-10-15 07:49:16 +08:00
yibaiba abe7af03b9 fix: pin SMS and task ownership across SIM changes 2026-10-14 21:35:38 +08:00
yibaiba 2e9c8854e1 fix: keep SMS ownership stable across SIM changes 2026-10-14 19:53:33 +08:00
yibaiba 130c055113 fix: reconcile SIM ownership across device changes 2026-10-14 17:52:09 +08:00
yibaiba 2c1b07b359 merge: add per-channel device notification filters 2026-10-14 15:52:25 +08:00
yibaiba ed4d7e41d9 fix(sim): preserve hexadecimal ICCID identities 2026-10-14 15:50:56 +08:00
BFNOC 383e9d5b8d feat(notify): limit SMS and call notifications per channel to chosen devices
- New config notification_device_filters maps a channel to device IDs
- A channel with a list only receives SMS and call notifications from those devices
- Other notifications still go to every channel
- Log each notification a filter holds back
- Read and save the filters through the notification settings API and ignore them when a client omits the field
- Add a device selector under the notification channel tabs
- Document device_filters in the OpenAPI spec
- Test the filter, the settings API, config persistence and the channel name list
2026-10-14 13:05:16 +08:00
yibaiba 07cceabf49 feat: add MBN profile management and per-SIM policies 2026-10-13 18:50:23 +08:00
yibaiba a5d1986d7d fix: harden SMS replay, DTMF ownership and reception readiness 2026-10-13 14:13:00 +08:00
yibaiba dbd9da92e8 feat(api): add device-list VoWiFi flags and SMS event stream
GET /api/devices now returns vowifi_active and vowifi_health from the
same sources as overview. Incoming SMS can be subscribed at
GET /api/sms/events with Last-Event-ID or after_id; payload matches
notifications latest.
2026-10-13 11:43:34 +08:00
yibaiba 3aa92ab05b fix: resolve SMS identity by current physical modem 2026-10-11 10:43:49 +08:00