- Shipped
- October 4, 2026 at 11:37 PM UTC
- Author
- Kamo
- Commit
- a828dc2
Shared boxes (SP98-N-2). A mailbox on the PBX that no Kamo extension is (K1M1's 8100, "KamoCRM Main Line") was never synced. The sweep's single AMI session now also asks VoicemailUsersList once the extensions are read, records each such mailbox in FreePBX's user context as a phone server's shared box (PHONE_VOICEMAIL_BOX, DDL in docs/sql; INSERT ... ON CONFLICT so a second sweep cannot poison the transaction), and syncs its messages as rows with no extension. Each box has a notify list (PHONE_VOICEMAIL_BOX_NOTIFY, nobody by default): a new message raises VOICEMAIL_RECEIVED for those members, opening Settings > Phone > Voicemails. GET/PUT **************** lists the boxes and replaces a box's list (MANAGE_VOIP_SETTINGS; members of the org only, at most 25). A box's messages are listed, played, marked read and deleted only by members who manage phone servers, in both voicemail lists. Audio (SP98-N-3). Settings plays the upload that names the message exactly (the helper now sends <mailbox>/<msg_id>), then the softphone's pairing by mailbox and time. With neither, the message itself is requested from the PBX: VoicemailAudioRequests records it in Redis for ten minutes, the policy pull carries it as voicemailAudio, and the helper uploads that message's audio under its own id. The player gets 404 with a reason: AUDIO_REQUESTED, AUDIO_NOT_SENT (asked three minutes ago, nothing came), HELPER_OFFLINE or AUDIO_NOT_UPLOADED. The softphone asks for the messages it cannot pair, so their audio arrives before anyone presses play. The per-server list now gives every row its id (the player asked for /voicemails/<externalId>/audio, which is no id, so it never played) and its mailbox, and reads the extensions once instead of per row.
