AiPBX
Features Install Videos Mobile Docs Live demo Contact Sponsor on GitHub UpCloud ($250 Free Credit) YouTube GitHub
ODOO Connect AiPBX with Odoo CRM & ERP — manage calls & customers in one place. Try Odoo Free →
Home / Documentation / GDPR, KVKK & Global Data Privacy (`/privacy`)

GDPR, KVKK & Global Data Privacy (/privacy)

Security → GDPR & Data Privacy (displayed as KVKK ve Veri Gizliliği when the portal language is set to Turkish) provides built-in, 100% optional telecommunications privacy and compliance tools.

All rules are Off by default on fresh installations. Administrators can keep everything disabled, enable only specific features, or apply a pre-configured regulatory preset in one click.


1. Global Regulatory Presets

PresetTarget StandardDefault Behaviour when Applied
Off / CustomDefault (no rules enforced)All disclosures, beeps, auto-purge, and AI locks disabled
KVKK (TR — 6698)Turkey Law No. 6698 & BTKPre-call Opt-Out (9), 180d recordings, 730d CDR anonymization
EU / UK GDPREU 2016/679, UK GDPR & ePrivacyExplicit Opt-In (1), 90d recordings, 365d CDR anonymization
US CCPA / Two-Party & FCCCIPA, CCPA/CPRA, 47 CFR § 64.1200Explicit Opt-In (1) + 15s periodic recording beep (MixMonitor B(15))
HIPAA (Healthcare)Protected Health Information (PHI)Disclosure notice, 15s beep, 90d retention, Cloud AI Lock enabled
PCI-DSS v4.0Call center payment card safetyPre-call Opt-Out (9), agent pause/resume, Cloud AI Lock enabled
LGPD / PIPEDA / POPIA / PDPABrazil, Canada, South Africa, Singapore, AustraliaExplicit Opt-In (1) + 15s periodic beep, 180d recordings

When enabled on inbound DID routes ([sub-privacy-consent] in extensions_inbound.conf):

  • Disclosure Announcement Only (notice): Plays the selected announcement sound before routing the call.
  • Opt-Out Key (optout): Plays the announcement and listens for the opt-out digit (default 9). If pressed, Asterisk sets __PRIVACY_NO_RECORD=1 across all child channels, skips MixMonitor in the DID route, Queue, and Ring Group, and tags CDR(accountcode)=PRIVACY_OPTOUT.
  • Explicit Consent Opt-In (optin): Sets __PRIVACY_NO_RECORD=1 by default and only enables recording (__PRIVACY_NO_RECORD=0) if the caller presses the consent key (default 1).
  • FCC Periodic Recording Beep (recording_beep_sec): Passes ,B(15) (or ,B(30)) to MixMonitor so a subtle periodic beep is played every N seconds while a call is being recorded. It applies to every recording: inbound routes, queues, ring groups and outbound calls.
  • Record outbound calls: on by default. Switched off, calls that leave through a trunk are not recorded at all. An inbound call that is forwarded out keeps the caller's opt-out (PRIVACY_NO_RECORD), so it is not recorded either.

3. Data Retention & Automated Nightly Purge

When Enable automated nightly data retention purge is checked, /etc/cron.d/aipbx runs php /usr/local/bin/privacy_purge.php every night at 03:45 (or on demand via Run Purge Policy Now):

  • Deletes call recording audio files (/var/spool/asterisk/monitor/*) older than N days, with their transcripts and summaries (cdr_ai)
  • Deletes voicemail archives and AI transcripts older than N days, and the voicemail messages themselves (INBOX, Old, Urgent of every mailbox), whether they were listened to or not
  • Deletes fax logs and spool files older than N days
  • Deletes chat messages older than N days
  • Anonymizes expired CDR rows across both asteriskcdr (Asterisk ODBC runtime) and cdrs (src = 'REDACTED', dst = 'REDACTED', clid = 'REDACTED') so call volume statistics remain intact without retaining personal phone numbers (or deletes expired CDR rows if configured)

4. Subject Access Request (SAR) & Right to Erasure

Searching a phone number or extension lists all matching CDRs (across asteriskcdr and cdrs), audio recordings, voicemails, faxes, and SIP signaling rows.

How a number matches. A full number (10 digits or more) matches by its last ten digits, so 0532…, +90532… and 90532… are one person. A shorter number (an extension, a short code) matches only exactly. Before 1.76.0 it matched as a fragment anywhere, and an erasure for 212 removed other people's records too. The erasure also removes the person's voicemail messages from the spool (their own mailbox and the messages they left).

  • Export SAR Data Package (JSON): Downloads a structured JSON archive for KVKK Art. 11 / GDPR Art. 15 & 20 requests and logs PRIVACY_SAR_EXPORT in the Audit Log.
  • Execute Right to Erasure: Permanently deletes matching audio recordings (and their transcripts), voicemails, faxes, and signaling events, anonymizes matching CDR entries as REDACTED, and records an immutable PRIVACY_ERASURE certificate in the Audit Log.

5. Live AGI/AI PII Redaction & Cross-Border Cloud AI Lock

  • Live Transcript PII / Payment Card Masking: When PCI-DSS pause/resume or a strict privacy preset (pci_dss, gdpr, kvkk, hipaa) is active, PrivacyService::redactTranscriptPii() automatically masks Luhn-validated payment card numbers (13–19 digits → [REDACTED-CARD]), CVV/CVC sequences ([REDACTED-CVV]), and 11-digit National IDs ([REDACTED-ID]) in live AGI voice transcripts and voicemail transcriptions before database storage or external LLM synthesis.
  • Cross-Border Cloud AI Lock: Checking Lock outbound Cloud AI services immediately disables all external Cloud AI providers (CloudAiService::configured() === false), ensuring call audio and transcripts never leave the local PBX server.

View or edit this page on GitHub

On This Page