Three upstream FreeSWITCH PRs that can cut CPU, bandwidth, and recording storage

celliso1

New Member
Jul 16, 2026
1
2
3
Washington State, USA
We've been running these on our FreeSWITCH fleet and have submitted all three upstream. Sharing here in case they help other FS PBX operators — feedback or testing is welcome, and community interest tends to help PRs get reviewed.

1. Lower CPU on call-heavy systems (compute)https://github.com/signalwire/freeswitch/pull/3061
FreeSWITCH copies internal events constantly, and the de-duplication of event headers gets quadratically slower as the number of channel variables per call grows — it becomes a real CPU hotspot. This PR fixes the scaling. Benchmarked duplicating a channel-variable event at different sizes: 1.5× faster at 50 variables, 1.9× at 100, 2.6× at ~190, 4.6× at 400 — the win grows with dialplan complexity. On our production voicemail boxes (~190 variables/call), the de-dup scan was eating roughly half of FreeSWITCH's CPU at busy hour and dropped to ~4% with the patch. If you run high call volume with rich dialplans/IVR, that's a straight compute saving — more calls per box, or smaller boxes.

2. Opus that actually works when transcoding — bandwidth + safe recordingshttps://github.com/signalwire/freeswitch/pull/3064
Fixes two long-standing Opus bugs: FreeSWITCH now negotiates Opus at 16 kHz instead of silently falling back to G.711, and it advances RTP timestamps at 48 kHz as RFC 7587 requires. Together these kill the warbly/stuttering Opus audio people have hit for years when transcoding (e.g. G.711 or AMR-WB ↔ Opus), and it keeps recordings intact rather than garbled. Two payoffs: (a) bandwidth — Opus at 16 kHz puts far fewer bytes on the wire than the G.711 it was falling back to, and less than default 48 kHz Opus, so every call is cheaper on cloud egress and easier on LAN/switch capacity at scale; and (b) it's what makes Opus safe to actually adopt without breaking audio or recordings.

3. Record directly in a smaller WAV format (storage)https://github.com/signalwire/freeswitch/pull/3083
Adds an opt-in file-string parameter to override the WAV write subtype, so you can record straight into a lighter format instead of running a separate transcode job after the fact. If you archive a lot of recordings, that's a storage saving (and you skip the extra transcode CPU). Default behavior is unchanged — you only get the new format if you ask for it.

Happy to answer questions on any of them. If one's useful to you, a quick test report or a reaction on the PR helps them land upstream.
 
@ja133 I have a box that has been running for 742 days and another one for 148 days currently. No sign of any cpu spikes? Is this something specific to your set up or a known problem?
 
@ja133 I have a box that has been running for 742 days and another one for 148 days currently. No sign of any cpu spikes? Is this something specific to your set up or a known problem?
How much utilization do those servers have? We have over 1500 endpoints