惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
Vercel News
Vercel News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
量子位
Y
Y Combinator Blog
IT之家
IT之家
博客园 - 聂微东
L
LangChain Blog
爱范儿
爱范儿
H
Help Net Security
GbyAI
GbyAI
F
Fortinet All Blogs
B
Blog
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
C
Check Point Blog
博客园 - 三生石上(FineUI控件)
小众软件
小众软件
D
DataBreaches.Net
Last Week in AI
Last Week in AI
WordPress大学
WordPress大学
B
Blog RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
宝玉的分享
宝玉的分享

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I built an open-source alternative to ViciDial. Here's th...
dev0miky · 2026-05-20 · via DEV Community

dev0miky

I started building the thing I actually wanted to deploy. It's on GitHub now, AGPL-3.0. This is a write-up of the architecture and, more usefully, the bugs that cost me real sleep.

The stack, and why

  • Kamailio at the SIP edge — high CPS, and secsipid for STIR/SHAKEN
  • FreeSWITCH for media — bgapi originate, mod_avmd, ESL, a Lua script per call
  • Go for the engine — pacing, lead claiming with SELECT FOR UPDATE SKIP LOCKED, a per-call state machine driven off ESL events
  • Postgres with row-level security for multi-tenancy — isolation enforced by the database, not by hoping every query has the right WHERE tenant_id =
  • React console for campaigns, leads, scripts, and reports

The split that people question most is Kamailio-in-front-of-FreeSWITCH. At small scale it's arguably overkill, but Kamailio is the right tool for SIP routing and CPS, and FreeSWITCH is the right tool for media — keeping them separate means I can scale the media tier without touching the edge.

Multi-tenancy I actually trust

Every business row carries a tenant_id, and Postgres RLS policies key off a session variable the API sets per request. Even a buggy query physically can't read another tenant's rows, because the database refuses. After years of seeing tenant isolation implemented as "we're careful with our WHERE clauses," letting the DB enforce it was the part I felt best about.

The bugs that ate my nights

Press-1 never dialed. I'd pivoted to bridging to external agents, and ripped out the internal-agent concept — but the press-1 pacing still gated on "available agents," which was now always zero. So a press-1 campaign would go live and do nothing. Fix was making press-1 fill to capacity like broadcast and letting the operator cap concurrency.

MP3 greetings played as silence. FreeSWITCH can't decode MP3 without mod_shout, which wasn't loaded. Loaded it — and the audio sounded terrible, because it was resampling a 44.1kHz stereo file down to 8kHz telephony on every single call. The real fix was transcoding uploads to 8kHz mono PCM WAV with ffmpeg at upload time, so mod_sndfile just plays them natively. Obvious in hindsight; not obvious at midnight.

"Press 1 does nothing" — a full night gone. In Lua, session:execute("playback", file) eats DTMF digits. My greeting playback was swallowing the keypress before the read after it ever listened. The call would fall straight through to the no-input hangup, so from the outside it looked like pressing 1 hung up the call. The fix is the canonical primitive — session:playAndGetDigits() — which plays the prompt and collects the digit in one step without eating it.

Answering-machine detection without paying for it. The old mod_amd isn't in current builds and the maintained mod_com_amd went commercial. So I built voicemail-drop on mod_avmd (beep detection): the broadcast Lua starts avmd, plays the message, and on the beep event replays it after the tone so a clean copy lands on the voicemail. It's a little hacky, but it's free and it works.

Where it is now

Pre-release, honestly. The press-1 and broadcast flows work end to end — originate, AMD, greeting, keypress, bridge, recording — but there's no production carrier wired up yet (I've been testing over a Linphone gateway, which has its own DTMF adventures), STIR/SHAKEN signing is configured in Kamailio but unproven against a real carrier, and there's no agent softphone app.

If you've shipped real outbound telephony, I'd genuinely like to know what I got wrong before I point real traffic at it.

Repo: https://github.com/dev0miky/Outbound-calling-system-P1-Broadcast

It's AGPL and self-hostable. Not selling anything — I just wanted the dialer I couldn't find.