me: voicemail page, greetings, My Phone home
/api/me/voicemail lists, streams (Range, download) and marks read or deletes through AMI VoicemailMove/VoicemailRemove, then rescans so MWI and the list agree. /api/me/greetings takes the raw recording or file and converts it with ffmpeg to 8 kHz PCM (media/audio.ts). My Phone gets a layout with Home (new voicemails) and Voicemail (play marks read, download, delete, record/upload greetings via MediaRecorder); the list refetches on the live voicemail.new event. e2e m4-t3 checks MWI goes off within 5 s after play and delete, and a browser-recorded greeting is what callers hear. Task: M4-T3
This commit is contained in:
1 parent
fe2eb4cc22
commit
f60dda0bb0
18 files changed
+978
-42
No files matched your search
@@ -12,6 +12,8 @@ type LiveStore = {
|
||||
trunks: Record<string, TrunkLive>;
|
||||
/** 911 alerts received while this tab was open, newest last; dismissed ones are removed. */
|
||||
emergencies: EmergencyCall[];
|
||||
/** Bumped on every voicemail.new, so the voicemail list knows to refetch. */
|
||||
voicemailSeq: number;
|
||||
};
|
||||
|
||||
export const useLive = create<LiveStore>(() => ({
|
||||
@@ -20,6 +22,7 @@ export const useLive = create<LiveStore>(() => ({
|
||||
extensions: {},
|
||||
trunks: {},
|
||||
emergencies: [],
|
||||
voicemailSeq: 0,
|
||||
}));
|
||||
|
||||
function apply(m: LiveMessage) {
|
||||
@@ -46,6 +49,8 @@ function apply(m: LiveMessage) {
|
||||
}
|
||||
case 'emergency.call':
|
||||
return { emergencies: [...s.emergencies, m.data] };
|
||||
case 'voicemail.new':
|
||||
return { voicemailSeq: s.voicemailSeq + 1 };
|
||||
case 'ami.status':
|
||||
return { amiConnected: m.data.connected };
|
||||
default:
|
||||
|
||||
Reference in new issue
Block a user