286 Commits
Author SHA1 Message Date
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 dccf97b141 chore: simplify SMS dispatch and phone test assertion 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 2ef773a0a3 test(phone): cover the unsupported mode switch guard 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
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 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
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
BFNOC c91ff20532 fix(imscore): await the Lebara UK P-CSCF after a port-s timeout
- Probe with a REGISTER after a Lebara UK port-s timeout and wait for the P-CSCF to reopen port-s once it succeeds
- Keep SMS readiness true with its own reasons while probing and waiting
- Bind the wait and the probe grace to the timed-out port-s generation and P-CSCF, and drop them on a new registration
- Send another probe REGISTER when port-s timed out while an earlier REGISTER was in flight
- End the wait when a REGISTER fails or a refresh negotiates an outbound flow, and the probe grace when recovery backs off
- Count a peer reopen during the wait as on-demand evidence only when no REGISTER is in flight
- Mirror sipOutbound into an atomic and clear the post-REGISTER wait flag on every port-s close
- Log entering, declining and ending the wait, each REGISTER during it and probe retries with the carrier preset and peer reconnect history
- Show in the web UI that SMS reception waits for the carrier to reopen port-s
- Add tests for the Lebara UK wait, probes, failures, stale states, outbound and carriers outside the list
2026-10-29 00:47:52 +08:00
BFNOC 9fbe885c98 fix(imscore): show SMS RX as awaiting the P-CSCF after a port-s close or timeout
- Report a registration whose port-s closed or timed out as awaiting the P-CSCF reconnect
- Report it as not ready again once Vodafone UK validation finds the downlink broken
- Keep reporting not ready after a failed RP report or on another P-CSCF
- Count an RP report failure on the registration flow even when port-s closed during its retries
- Show the awaiting state as pending with its own detail instead of failed in the web UI
- Test the close kinds, every prerequisite, failed validation, report failures, another P-CSCF and the web state
2026-10-28 09:03:49 +08:00
yibaiba 9fb465451b feat(mcp): add output contracts, workflow guidance and access diagnostics 2026-10-25 21:36:28 +08:00
yibaiba 51c998bc1c feat(mcp): support Grok Build and simplify setup copy 2026-10-25 20:56:19 +08:00
yibaiba 44afb373f7 fix(mcp): explain required token names instead of disabling creation 2026-10-25 20:39:50 +08:00
yibaiba b7b38ea74b feat(mcp): allow permanent token deletion and audio cleanup 2026-10-25 20:33:09 +08:00
yibaiba 00e181ca7b fix(mcp): span settings section across the workspace grid 2026-10-25 20:22:22 +08:00
yibaiba 85a615e7bf feat(mcp): add setup profiles for seven agent clients 2026-10-25 18:54:57 +08:00
yibaiba 40ca0dfa81 feat(mcp): add business tools, token management and browser audio binding 2026-10-25 13:30:08 +08:00
yibaiba 7326042d63 fix(volte): restore voice indications after radio cycles 2026-10-21 09:11:03 +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 bb18c3030c fix(phone): close media recovery race gaps 2026-10-19 19:00:47 +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
yibaiba c9753b9f65 fix(phone): expose recording load failures and release blobs 2026-10-19 17:40:43 +08:00
miaoguoqiang f10cb40506 feat(phone): 通话记录支持一键回拨,录音改用原生 audio 控件
通话记录页两处体验改进:

- 一键回拨:每条记录新增回拨按钮,直接以该记录的对端号码发起双向呼叫,
  复用现有 startCall 流程。号码为空时不显示;拨号中或已有活动通话时禁用,
  避免并发拨号。

- 录音播放改原生控件:删掉自定义播放按钮与 playingId/playback 那套手动
  状态,换成 <audio controls preload="none">,进度条、拖动 seek、音量、
  时长全部由浏览器提供,移动端也直接用系统播放器 UI。

  录音接口需要 Bearer 鉴权,而 <audio src> 无法携带 Authorization 头,
  所以 src 仍是 blob:改为 IntersectionObserver 在滚到可见时才异步换取,
  避免一次拉取整页录音。

  样式补 .history-actions 分组与 @media (max-width: 640px):手机端按钮
  缩到 34px、按钮组转横向、播放器占满内容宽度。
2026-10-19 17:38:31 +08:00
yibaiba 1b0ac597b5 fix(phone): reject stale active-call snapshots 2026-10-19 17:38:02 +08:00
miaoguoqiang 7d0b785b99 fix(phone): 通话状态不被重连时的 HTTP 快照回退
SSE 断连重连(onOpen)会触发 refresh(),它用 phoneService.active() 返回的
快照整体覆盖前端 calls 列表。SSE 事件流与 HTTP 快照是两条并发数据源、无
顺序保证:若快照恰好落在 call_answered 之前返回,会用还写着 ringing 的旧
状态把前端已更新的 connected 顶回去,通话卡片永远停在"响铃中"——媒体与
DB 都正常,所以对方能听到声音、只是 UI 不动,且只在"断连"与"接通"撞上
同一时间窗时偶发。

refresh() 改为 mergeCalls():按"状态只进不退"合并(calling < ringing/
waiting < connected),本地更靠后状态不被远端旧状态覆盖;active 快照里
没有的通话(服务端已结束)照常删除。

同时为事件总线加 call_answered/call_ended 发布时的订阅者数埋点,用于区分
"SSE 已断(订阅者 0)"与"有订阅但前端未消费"。
2026-10-19 17:36:00 +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 d433d7f05f [webdav-archive-cleanup-REVIEW-01] fix: harden archive cleanup consistency 2026-10-16 01:00:19 +08:00
yibaiba 32d1b98e1a [webdav-archive-cleanup-ARCHIVE-04] feat: add WebDAV archive settings 2026-10-16 00:45:06 +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 31daeee945 fix: preserve notification channel settings and SIM context 2026-10-15 07:49:16 +08:00
yibaiba 2c1b07b359 merge: add per-channel device notification filters 2026-10-14 15:52:25 +08:00
BFNOC e25e0c8074 feat(notify): name the receiving SIM and device in SMS notifications
- Pass the receiving SIM's ICCID and IMSI from cellular and VoWiFi SMS to the notifier
- Add a local line with the stored number of that SIM, or its last four ICCID digits
- Show the device name next to its ID in SMS, call and IP change notifications
- Expose the local number as local_number in webhook meta and webhook and WeCom templates
- List the new placeholder in the notification settings
- Test the number, the ICCID fallback, device names and the webhook template
2026-10-14 13:25:48 +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 517e449e93 fix: harden MBN reconciliation and align configuration UI 2026-10-14 07:24:09 +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 f1615d532b fix(phone): reserve media during call setup 2026-10-07 12:43:34 +08:00
yibaiba 24a2071252 fix(phone): release failed unbound media sessions 2026-10-07 12:09:04 +08:00
sk cfcd238917 fix(phone): bound modem playback latency and wait for media connection
Retain recent 20 ms PCM frames instead of replaying seconds of buffered speech after USB startup or network stalls. Pad missing input with silence, bound the playback pipe, and wait for the playback worker to exit during shutdown. Wait for WebRTC to connect before reporting prepared media, and add audio and call-end diagnostics with regression coverage.
2026-10-05 17:32:37 +00:00
yibaiba 7b620435c3 revert(phone): restore modem direct calling on main 2026-09-24 16:49:46 +08:00
yibaiba 011a8a68c4 refactor(phone): move modem direct calling to dedicated branch
Preserve the complete implementation on feat/modem-direct and model/main. Remove its UI, backend, ADB preparation, embedded runtime assets and Docker dependencies from main.

Retain SIM outbound limits, dialer device memory, proxy diagnostics and shared VoWiFi/VoLTE lifecycle fixes. Adapt shared regression tests to supported phone modes.
2026-09-24 16:27:48 +08:00
yibaiba ee01f850ad fix(phone): prevent disabled mode buttons from switching modes 2026-09-24 14:29:40 +08:00
yibaiba 6aab5dbb2f feat(phone): automatically prepare ADB for supported modem voice devices 2026-09-24 14:26:51 +08:00