By Stan Reshetnyk, CTO, Trembit — WebRTC and real-time media architecture, HIPAA/KBV-regulated telemedicine · Last updated 18 August 2026
FreeSWITCH is not “HIPAA compliant” or “GDPR compliant” out of the box — and neither is any other media server, because compliance is a property of the whole architecture and the operational controls around it, not a checkbox software ships with. What a self-hosted, on-prem FreeSWITCH deployment does give a regulated team is more of the controls those regulations require — data residency, no third-party media routing, full audit visibility — than a black-box cloud telephony or CPaaS platform does. But that advantage is only real if encryption, access control, audit logging, and the AI layer (if any voice AI is involved) are deliberately architected in, not assumed.
Key takeaways
- No software ships “HIPAA compliant.” Compliance is a property of the architecture and operations — encryption, access control, audit logging, vendor agreements, and data residency — not a feature of FreeSWITCH or any media server.
- HIPAA’s Security Rule requires PHI encrypted in transit and at rest, access controls, audit logging, and a signed Business Associate Agreement (BAA) with every vendor that touches PHI — including a SIP-trunk provider or a cloud STT/TTS API if raw patient audio passes through it.
- GDPR adds requirements HIPAA doesn’t: a documented lawful basis for processing voice data, cross-border transfer rules (voice data leaving the EU/EEA needs a valid transfer mechanism), and the right to erasure — which is architecturally hard for a system that records calls.
- For SIP/RTP, “encrypted” means SRTP for media plus TLS/DTLS for signaling and key exchange. An unencrypted RTP leg anywhere in the path — a common shortcut on internal legs “because it’s inside our network” — breaks the compliance story even when the edges are encrypted.
- A SIP trunk is both a compliance risk and a financial one. A compromised trunk can place thousands of dollars in international calls within hours (toll fraud) and expose call data — one breach, two incidents. Trunk hardening (ACLs, TLS, credential rotation, rate-limiting) protects the data on the calls and the ability to place calls at all.
- Self-hosting keeps PHI-bearing audio inside infrastructure you control — but it doesn’t remove the compliance work, and it isn’t automatically “more compliant.” It removes an entire category of third-party BAA risk that a cloud CPaaS introduces by design, in exchange for operational ownership: you now own patching, HA, hardening, and monitoring. The core trade is vendor risk for operational ownership, and it only pays off if you operate the infrastructure to a compliance standard.
- “Sovereign AI” voice — running STT/LLM/TTS on-prem or in a controlled VPC instead of calling a public cloud AI API — is a real, growing 2026 pattern for regulated voice, sharpened by the EU AI Act’s transparency obligations, which apply from 2 August 2026. It trades model quality and latency for keeping raw voice inside the compliance perimeter.
If you own compliance rather than code, the sections you want are what HIPAA and GDPR actually require, where a “compliant” deployment breaks down, and the checklist at the end. The middle sections are for the engineers who have to build it.
If you’re the person who has to sign off on the architecture, the fastest way to use this piece is as a gap list: read the checklist, mark what your current design can’t answer “yes” to, and bring the gaps to a review. That’s also what a 30-minute call with us produces — a concrete gap list and a go/no-go you can hand your compliance officer, not a sales conversation. Skip to how that works.
This piece is part of our FreeSWITCH in Production series. It assumes you’ve already chosen FreeSWITCH (or a self-hosted media server like it) as your starting point — if you’re still weighing that, start with FreeSWITCH vs Asterisk. Here we stay on one question: what has to be true of a FreeSWITCH-based voice layer for it to survive a HIPAA or GDPR review.
This is not legal advice. It’s engineering guidance grounded in the text of HIPAA’s Security Rule and GDPR. Every specific regulatory requirement below is sourced to a primary reference or flagged as something to confirm with counsel — because a confidently wrong statement about what a regulation “requires” is worse than not covering it at all.
What do HIPAA and GDPR actually require from a voice/telephony system?
They require different things, and the fastest way to build a non-compliant system is to treat them as interchangeable. Below they’re separated on purpose.
HIPAA (US) governs protected health information (PHI). Under its Security Rule, a voice system that carries PHI needs, at minimum: encryption of PHI in transit and at rest; access controls and authentication (unique user identity, role-based access to recordings and logs); audit logging of who accessed what PHI and when; and a signed Business Associate Agreement with every vendor in the data path that could touch PHI — the SIP-trunk provider, a cloud speech-to-text or text-to-speech API, the hosting provider. On top of that sits the Breach Notification Rule, which obliges you to notify affected individuals and HHS when unsecured PHI is breached. (HHS — HIPAA Security Rule) One practical nuance the Security Rule is explicit about: encryption is an addressable implementation specification, not a flat “you must” — meaning you either implement it or document a reasoned, equivalent alternative. In practice, for real-time voice carrying PHI, “we chose not to encrypt” is nearly impossible to defend, so treat encryption as mandatory in all but name.
GDPR (EU/EEA) governs personal data, and a voice recording of an identifiable person is personal data — voice carrying health information is a special category under Article 9, with a higher bar. GDPR asks a different set of questions than HIPAA. You need a documented lawful basis for processing the voice data (Article 6, and an Article 9 condition for health data) — consent is one basis, but not the only one, and it has to be recorded. You need to respect data-residency and cross-border-transfer rules: voice data leaving the EU/EEA requires a valid transfer mechanism (an adequacy decision or Standard Contractual Clauses). And you have to honour the right to erasure (Article 17) — which is genuinely hard for a system that records calls, because “delete this patient’s data” now has to reach into recordings, transcripts, backups, and logs. (GDPR — full text, gdpr.eu) Germany’s DSGVO, and healthcare-specific certifications built on it, push these further — Germany-only residency and self-hosted media are not unusual requirements there, as we’ll come back to.
The short version: HIPAA is about safeguarding PHI and papering the vendor chain with BAAs; GDPR is about lawful basis, where the data physically lives, and the individual’s right to have it erased. A voice architecture can satisfy one and fail the other.
Does encryption alone make a voice system HIPAA/GDPR compliant?
No. Encryption in transit and at rest is necessary, but it is one control among several. A fully encrypted call path that has no access controls on the recording store, no audit log of who played back a recording, no BAA with the SIP-trunk carrier, or — for GDPR — no documented lawful basis and no erasure mechanism, is not compliant. Encryption protects the data on the wire and on disk; it says nothing about who can reach it, whether you can prove who reached it, or whether you were allowed to collect it in the first place. Treat “is it encrypted?” as the first question, never the last.
Why run FreeSWITCH self-hosted or on-prem instead of cloud telephony for regulated voice?
The honest answer is a trade-off, not a verdict. Self-hosting is not automatically more compliant — it moves work and risk around, and whether that’s the right move depends on your team.
What self-hosting gives you. PHI-bearing audio never has to leave infrastructure the covered entity controls. You aren’t inheriting a third-party CPaaS’s BAA scope and sub-processor list, and you aren’t exposed when that provider adds a new sub-processor you didn’t vet. You own the audit logs end to end, rather than depending on what a vendor chooses to expose. And you control data residency directly — which matters for HIPAA, matters more for GDPR, and is effectively non-negotiable for German KBV-style requirements where every component has to sit on German-controlled infrastructure.
What self-hosting costs you. You now own the operational burden a managed CPaaS was absorbing: patching, high availability, security hardening, monitoring, capacity, and incident response. A self-hosted media server that isn’t patched or monitored is less safe than a well-run managed platform, not more — the control only pays off if you actually operate it to a high standard. The scaling and clustering side of that burden is a topic on its own (see Scaling FreeSWITCH in Production) rather than a rehash here.
So the decision isn’t “self-hosted wins.” It’s: self-hosting trades vendor risk for operational ownership. It’s the right call when data control is a hard requirement and you have — or are willing to build — the in-house capability to run infrastructure to a compliance standard. It’s the wrong call when you’d be standing up a media server you can’t staff to patch.
What is “sovereign AI” voice, and why is it a 2026 compliance trend?
“Sovereign AI” voice means running the AI pipeline — speech-to-text, the LLM, text-to-speech — inside infrastructure you control (on-prem or a controlled VPC with self-hosted or privately-deployed models) so that raw voice data never crosses a third-party API boundary. The driver is straightforward: every hop to an external cloud AI API is a separate data-processing question, not just the model provider’s problem. Send raw patient audio to a public STT API and that API vendor is now a business associate who needs a BAA (or, under GDPR, a processor who needs a data-processing agreement and a valid transfer mechanism if they’re outside the EEA). The sovereign-AI pattern collapses that exposure by keeping the audio inside the perimeter.
Two things make this a live 2026 concern rather than a hypothetical. First, compliance and legal teams have started flagging cloud STT/LLM/TTS APIs as a data-residency and BAA problem specifically for regulated voice — health, finance, legal — which is what pushed the pattern from “nice idea” to “requirement” for a growing set of teams. Second, the EU AI Act’s transparency obligations (Article 50) apply from 2 August 2026, imposing direct duties on providers and deployers of AI systems that interact with people — including disclosing that a caller is talking to an AI. (European Commission — transparency obligations guidance; Article 50, artificialintelligenceact.eu) That’s a current, dated obligation for any voice-AI product touching EU users, not a future one.
Be clear-eyed about the trade-off. On-prem and self-hosted models generally lag the best cloud models on quality, and running them means real infrastructure investment — GPU capacity, model-serving, MLOps discipline. Sovereign AI is the right call for teams where keeping voice data inside the perimeter is a hard requirement, not a free upgrade for everyone. Where FreeSWITCH fits in this picture is as the call-control and media layer: it terminates the SIP/WebRTC call, bridges the audio, and hands frames to a self-hosted STT/LLM/TTS stack — rather than that audio being streamed out to a public API. The build mechanics of that pipeline (ESL, media streaming, latency budget, barge-in) are a separate subject we cover in How to Build a Voice AI Agent on FreeSWITCH. This is also the exact intersection our real-time voice AI work lives at — the compliant media path, not just the model call.
One boundary worth stating plainly: this section is architecture guidance — how you would structure a sovereign-AI voice pipeline — not a claim that Trembit runs production voice AI on FreeSWITCH. We build the real-time media and call-control layer in production; the on-prem STT/LLM/TTS layer described here is a pattern, engineered from real pieces, not a shipped product we’re pointing at.
How do you secure a FreeSWITCH SIP trunk for a compliant deployment?
A SIP trunk is the seam where a compliant deployment most often leaks — both data and money. Two distinct risk classes live here: privacy/compliance exposure, and toll fraud. A compromised SIP trunk is usually both at once — a security incident and a compliance incident — which is why this section earns its length. The controls that matter:
- Encrypt the media with SRTP and the signaling with TLS. SRTP (RFC 3711) encrypts the RTP media; DTLS-SRTP (RFC 5764) handles the key exchange for WebRTC legs; SIP signaling rides over TLS. (RFC 3711; RFC 5764) Never carry PHI-adjacent signaling over plaintext UDP SIP — even call metadata (numbers, names in display fields) can be sensitive.
- Use mutual TLS where the trunk provider supports it. One-way TLS proves the server’s identity; mTLS proves both ends, which closes off a class of impersonation on the trunk.
- Lock the trunk down with IP-based ACLs / allow-listing. Only the carrier’s known signaling IPs should be able to reach the SIP interface. Leaving ACLs open “for testing” and never closing them is one of the most common go-live mistakes.
- Rotate strong SIP credentials and disable default/guest access. Default extensions, guest dialplans, and weak registrar passwords are the standing invitation for toll fraud.
- Rate-limit and add intrusion protection. REGISTER-flood and brute-force attacks against a SIP endpoint are constant background noise on the public internet; rate-limiting and fail2ban-style blocking of repeat offenders are baseline, not hardening extras.
- Practice dialplan and CDR hygiene. Make sure call-detail records and logs don’t inadvertently capture PHI in free-text or custom-header fields — an audit log that quietly stores patient identifiers becomes a PHI store you didn’t mean to create, with all the obligations that follow.
Toll fraud deserves its own line. A compromised trunk can be used to place thousands of dollars of international calls in hours — a direct financial loss that is distinct from any data-privacy question, and one that also triggers a security-review obligation because the same breach that enabled the fraud may have exposed data. Treat trunk security as protecting two assets at once: the data on the calls, and the ability to place calls at all. For FreeSWITCH-specific configuration, follow the current FreeSWITCH / SignalWire documentation rather than any single blog’s snippet — security defaults change between releases.
What does a HIPAA/GDPR-compliant FreeSWITCH architecture actually look like?

End to end, a defensible reference architecture keeps PHI-bearing audio inside a controlled perimeter and only lets it cross that boundary at points you’ve covered with an agreement:
- Encrypted client leg. WebRTC or mobile clients connect over DTLS-SRTP; browsers reach the system through a SIP-over-WebSocket / WebRTC gateway. (The mechanics of that browser-to-SIP leg are their own topic — see Connecting FreeSWITCH to WebRTC.)
- FreeSWITCH as SIP proxy/B2BUA and PSTN bridge. Because it terminates and re-originates both signaling and media between the WebRTC/mobile, PSTN, and hospital-SIP legs, FreeSWITCH here acts as a back-to-back user agent (B2BUA / session border function), not a strict RFC 3261 SIP proxy — it’s where call control, recording policy, and consent handling are enforced. For brevity, the rest of this piece calls that role the “SIP/PSTN bridge.”
- Encrypted SIP trunk to a BAA-covered carrier. The PSTN hop leaves your perimeter, so the carrier must be under a BAA (HIPAA) and a data-processing agreement with a valid transfer mechanism (GDPR), with SRTP/TLS on the trunk.
- Network segmentation. The voice infrastructure sits on its own segment, isolated from the general application network, so a compromise elsewhere doesn’t reach the media plane.
- Centralized audit logging. Log who accessed what call and when — including recording playback — without necessarily logging call content. “We logged that a recording exists” is not the same as “we can prove who listened to it.”
- Explicit call-recording and consent handling (covered below), and — for a sovereign-AI deployment — an optional self-hosted AI layer that receives media frames from FreeSWITCH rather than from a public API.
Where Trembit’s production experience sits in this picture. On a HIPAA/GDPR-compliant healthcare communications platform, we run FreeSWITCH in production in exactly the SIP/PSTN bridge role described in step 2 — connecting WebRTC and mobile clients with phone callers and with hospitals’ own corporate SIP conferencing infrastructure. That’s the concrete production experience behind this piece. For related healthcare-platform work on the same class of system, our Cloudbreak case study documents a different subsystem on that kind of platform: a custom Mediasoup SFU doing real-time in-call AI translation (audio interception and dubbing). It’s worth reading for the compliance-in-a-real-time-pipeline discipline, but to be precise about the boundary — that translation work runs on Mediasoup, not FreeSWITCH, and the case study covers the SFU translation layer, not the SIP/PSTN bridge. They’re two distinct pieces of infrastructure that can coexist on the same platform; don’t read the case study as documentation of the FreeSWITCH role, which is a separate, CTO-confirmed part of our production work.
Separately — and on a different technology stack — we took a German psychotherapy telemedicine platform (WebPRAX) through full KBV certification, with DSGVO compliance, Germany-only data residency, and self-hosted STUN/TURN so no media touched third-party relays. That platform is peer-to-peer WebRTC, not a FreeSWITCH deployment; we mention it only as evidence of the compliance-process depth — certification review, data-residency discipline, self-hosted infrastructure — that a regulated voice build actually demands, not as a FreeSWITCH proof point. This kind of work is the core of our HIPAA/GDPR-compliant telemedicine development and broader WebRTC development practice.
If your blocker is the architecture on this page rather than the code, this is the exact perimeter, trunk, and AI-path decision set we pressure-test in a free 30-minute architecture review — before engineering time gets committed to the wrong foundation. Bring your current design; you’ll leave with a gap list.
Where does a “compliant” FreeSWITCH deployment actually break down?

Most deployments don’t fail the audit on the parts the team designed carefully — they fail on the shortcuts. These are the recurring failure modes worth checking for by name:
- The unencrypted internal RTP leg. The edges are SRTP, but an internal hop between FreeSWITCH and, say, a recording box or a conference bridge runs plaintext RTP “because it’s inside our VPC.” PHI in transit inside your network is still PHI in transit. This is the single most common real-world gap.
- The cloud STT/TTS integration added later. A voice-AI or transcription feature gets bolted on months after launch, routing audio to a public API — and nobody updates the BAA list or the GDPR processor register. The architecture was compliant at launch and quietly stopped being so.
- Call recording with no consent capture. Recording gets switched on for quality or clinical reasons with no mechanism to capture and store consent. US recording-consent law varies by state (one-party vs. two-party/all-party consent), and GDPR has its own consent and retention rules — this is genuinely outside a single clean answer, so confirm the specific rule for your jurisdictions with counsel rather than assuming a universal one.
- CDR/dialplan logging that captures PHI. Caller-ID fields, custom SIP headers, or free-text dialplan variables end up recording patient names or identifiers in logs that were never designed as a PHI store — creating obligations (encryption, access control, retention limits) you didn’t plan for.
- SIP ACLs left open from testing. The allow-list was opened up during integration and never locked back down before go-live, leaving the trunk exposed to fraud and unauthorized access.
- Audit logs that record metadata but not access. The system logs that a call happened and that a recording was created, but not who played the recording back. When an auditor asks “who listened to this patient’s session,” the honest answer is “we can’t tell you” — which is itself a finding.
None of these are exotic. They’re the predictable consequences of treating compliance as a launch checkbox rather than a property you have to maintain as the system evolves.
FreeSWITCH HIPAA/GDPR compliance checklist

Bring this into an architecture review. It’s organized by control category; each item is a question the deployment should be able to answer “yes” to.
| Category | What to verify |
|---|---|
| Encryption | SRTP on every media leg — including internal ones; DTLS-SRTP for WebRTC key exchange; TLS for all SIP signaling; encryption at rest for recordings and transcripts. |
| Access control | Unique per-user identity; role-based access to recordings, transcripts, and logs; SIP authentication and IP ACLs; credential rotation; default/guest access disabled. |
| Audit logging | Access logged (including recording playback), not just call metadata; configuration-change logging; logs protected as the sensitive store they are. |
| Vendor / BAA | Signed BAA (HIPAA) / DPA (GDPR) with the SIP-trunk carrier, the hosting provider, and any cloud AI API in the path — every vendor that could touch PHI. |
| Data residency | Documented where audio, transcripts, and backups are processed and stored; a valid cross-border transfer mechanism for any GDPR data leaving the EEA. |
| Consent | Call-recording consent captured and stored appropriately for each jurisdiction; retention limits defined; erasure mechanism reaches recordings, transcripts, backups, and logs (GDPR right to erasure). |
| AI layer | If voice AI is used: is it on-prem/sovereign or a third-party API? If third-party, is that vendor BAA/DPA-covered? Is AI interaction disclosed to the caller (EU AI Act, from 2 Aug 2026)? |
Frequently asked questions about FreeSWITCH, HIPAA, and GDPR compliance
Is FreeSWITCH HIPAA compliant out of the box? No — and no media server is. HIPAA compliance is a property of the whole architecture and the operational controls around it (encryption, access control, audit logging, BAAs, data residency), not a feature FreeSWITCH ships with. Self-hosted FreeSWITCH gives you more of the controls HIPAA requires than a black-box cloud platform, but only if you configure and operate them.
Do I need a BAA with my SIP trunk provider? If protected health information could pass through that trunk — which it does whenever a patient call is bridged to the PSTN — then yes, the carrier is a business associate under HIPAA and needs a signed BAA. The same applies to your hosting provider and any cloud AI API in the path. Confirm the specifics with counsel, but the default assumption for a PHI-carrying trunk is “BAA required.”
Can I run voice AI (STT/LLM/TTS) on-prem for HIPAA/GDPR compliance? Yes — this is the “sovereign AI” pattern: run the STT/LLM/TTS stack on your own infrastructure or in a controlled VPC so raw voice never crosses a third-party API boundary, with FreeSWITCH as the call-control/media layer feeding it. The trade-off is real: self-hosted models generally lag the best cloud models on quality and require GPU capacity and MLOps investment. It’s the right call when data control is a hard requirement, not a free upgrade.
Is call recording legal under HIPAA and GDPR? It can be, but the rules differ and are jurisdiction-specific. Under HIPAA the recording must be safeguarded like any other PHI (encryption, access control, audit, retention). US recording-consent law varies by state — some require one-party consent, others all-party. GDPR requires a lawful basis and honors the right to erasure. Because this varies by jurisdiction, confirm the exact rules with counsel rather than relying on a single universal answer.
Does self-hosting FreeSWITCH remove the need for a BAA entirely? No — this is a common misconception. Self-hosting removes third-party BAA risk for the media routing you now control, but any external vendor still in the path needs an agreement: the PSTN carrier, the hosting/colocation provider, and any cloud AI service. Self-hosting shrinks the vendor chain; it doesn’t eliminate it.
What’s the difference between HIPAA and GDPR for a voice/telephony system? HIPAA (US) focuses on safeguarding PHI — encryption, access controls, audit logging, and BAAs across the vendor chain. GDPR (EU/EEA) focuses on lawful basis for processing, where the data physically lives (residency and cross-border transfer), and the individual’s right to erasure. A voice architecture can satisfy one and fail the other, so build to both explicitly if you serve users in both regions.
Let’s pressure-test the architecture before you build on it
If HIPAA, GDPR, or the EU AI Act’s transparency obligations are the launch blocker standing between your voice product and go-live, that’s exactly the architecture-review conversation worth having before a team commits engineering time to the wrong foundation. Book a free 30-minute call: bring the specific decision you’re stuck on — the compliance perimeter, the SIP-trunk hardening, whether your AI path can touch the audio at all, or a self-hosted-vs-cloud call — and we’ll pressure-test it with an engineer. You leave with a concrete gap list and a go/no-go you can hand your compliance officer. No deck, no pitch. Trembit runs FreeSWITCH in production on regulated healthcare voice, and has taken a telemedicine platform through full KBV/DSGVO certification, so this is the exact intersection where we work — start at our real-time voice AI page, or read how we approach compliant telemedicine development.