feat: per-org hold music & ringback upload with auto-transcoding#198
Merged
shridarpatil merged 4 commits intomainfrom Feb 27, 2026
Merged
feat: per-org hold music & ringback upload with auto-transcoding#198shridarpatil merged 4 commits intomainfrom
shridarpatil merged 4 commits intomainfrom
Conversation
Allow each organization to upload custom hold music and ringback tones via the Settings UI, with global config values as fallback defaults. Backend: - Add hold_music_file and ringback_file to org settings JSONB - Add UploadOrgAudio handler with org-scoped filenames - Add getOrgHoldMusic/getOrgRingback helpers in calling Manager - Wire org hold music into transfer flow - Wire ringback tone into outgoing call ringing event - Add POST /api/org/audio route Frontend: - Add file upload fields for hold music and ringback in Calling tab - Add play/preview button for uploaded audio - Add uploadOrgAudio API method
The embedded frontend assets in internal/frontend/dist/ are gitignored, so the Docker build was using stale/empty assets. Add a Node.js build stage that builds the frontend and copies the output into the Go embed directory before compiling the binary.
The AudioPlayer sends raw Opus packets over RTP at 48kHz/20ms frames. Uploaded files in other formats (MP3, Vorbis OGG, WAV) were saved as-is, producing distorted/garbled audio during playback. Now UploadOrgAudio transcodes any input to OGG/Opus 48kHz mono via ffmpeg before saving, ensuring compatibility with the RTP player. Also adds ffmpeg to both Dockerfiles as a runtime dependency.
Apply the same ffmpeg transcoding to UploadIVRAudio that was added to UploadOrgAudio, so IVR greeting audio files are also guaranteed to be compatible with the WebRTC AudioPlayer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docker/Dockerfileso local Docker builds include fresh frontend assetsTest plan
docker build -f docker/Dockerfile .produces a working image with the UI changes