Asterisk to FreeSWITCH Migration Guide: Step-by-Step (2026)
Thinking about migrating from Asterisk to FreeSWITCH? First, read the honest answer: it's a full re-engineering effort, not a translation. There's no automatic converter. But with the right parallel-run strategy, it's a zero-downtime move. Here's exactly how CelloIP runs these migrations — drawn from 25+ VoIP platform migrations.
New to the comparison? Start with the full Asterisk vs FreeSWITCH guide to confirm migration is actually the right call.
Read This First: Should You Even Migrate?
Migrate only with a concrete driver: (1) you're hitting Asterisk's concurrency ceiling above 2,000–3,000 calls, (2) you need FreeSWITCH's permissive MPL licence to embed in a proprietary SaaS, or (3) you require FreeSWITCH-specific media capabilities. If Asterisk meets your needs today, a working system has no business case to rebuild. Don't migrate for fashion.
Compatibility Reality Check
What carries over and what must be rebuilt. The honest answer: almost everything application-level gets rebuilt; config-level features get remapped.
| Component | Asterisk | FreeSWITCH | Migration Effort |
|---|---|---|---|
| Dialplan | extensions.conf | XML dialplan | ✗ Full rewrite |
| App scripting | AGI (stdin/stdout) | ESL (async events) | ✗ Re-architect |
| Management API | AMI | ESL events | ✗ Rewrite |
| SIP channel | chan_pjsip | Sofia-SIP | ± Reconfigure |
| Voicemail | app_voicemail | mod_voicemail | ± Reconfigure |
| Conferencing | ConfBridge | mod_conference | ± Reconfigure |
| Call recording | MixMonitor | Native record | ± Reconfigure |
| SIP trunks | PJSIP endpoints | Gateways | ± Remap config |
| Database (realtime) | ODBC/ARA | mod_xml_curl | ✗ Rebuild |
The 5-Phase Migration Process
Audit & Inventory
Catalogue every dialplan context, AGI script, AMI integration, channel driver, and external dependency. Identify what's load-bearing vs legacy cruft you can drop.
Feature Mapping
Map each Asterisk feature to its FreeSWITCH equivalent. Flag anything with no clean equivalent for custom design. Decide what to rebuild vs retire.
Rebuild in FreeSWITCH
Rewrite dialplan logic as FreeSWITCH XML, AGI scripts as ESL applications, AMI integrations as ESL event consumers. This is the bulk of the effort — application logic, not dialplan.
Parallel Run
Deploy FreeSWITCH alongside Asterisk. Place Kamailio/OpenSIPS in front as a dispatcher. Route 5% → 25% → 50% of traffic to FreeSWITCH, comparing call detail records and quality.
Cutover & Decommission
Shift 100% of traffic to FreeSWITCH. Monitor for 1–2 weeks with Asterisk on standby for instant rollback. Then decommission Asterisk.
The Parallel-Run Cutover (Zero Downtime)
The key to a safe migration is never doing a big-bang switch. Place a SIP proxy (Kamailio or OpenSIPS) in front of both platforms, then shift traffic gradually using the dispatcher module:
# Kamailio dispatcher — weighted routing during migration
# dispatcher.list:
# setid destination flags priority attrs
1 sip:asterisk.internal:5060 0 10 weight=95 # 95% to Asterisk
1 sip:freeswitch.internal:5060 0 10 weight=5 # 5% to FreeSWITCH
# As confidence grows, shift the weights:
# Day 1: 95/5 Day 3: 75/25 Day 7: 50/50
# Day 10: 25/75 Day 14: 0/100 (Asterisk on standby)
# In kamailio.cfg request_route:
if (!ds_select_dst("1", "9")) { # algorithm 9 = weight-based
sl_send_reply("503", "No destination available");
exit;
}
t_relay();If FreeSWITCH misbehaves at any weight, instantly revert the dispatcher weights — no calls drop. This is how CelloIP runs migrations with zero customer-facing downtime.
Frequently Asked Questions
Can you automatically convert Asterisk dialplan to FreeSWITCH?
No. There's no reliable automatic converter. Asterisk dialplan and FreeSWITCH XML are fundamentally different paradigms, and AGI scripts must be rewritten as ESL applications. Migration is re-engineering, not translation. Plan 4–8 weeks for a medium deployment.
How long does an Asterisk to FreeSWITCH migration take?
Small (basic PBX/IVR): 2–4 weeks. Medium (call center, integrations): 4–8 weeks. Large carrier/CPaaS: 12–24 weeks. The biggest cost is rewriting AGI/AMI logic as ESL, not the dialplan.
Should I migrate from Asterisk to FreeSWITCH at all?
Only with a concrete driver: hitting Asterisk's concurrency ceiling (>2,000–3,000 calls), needing MPL licence for proprietary SaaS, or requiring FreeSWITCH-specific media features. If Asterisk meets your needs, migration is rarely worth the cost.
Can both run in parallel during migration?
Yes — it's the recommended approach. Deploy FreeSWITCH alongside Asterisk, place Kamailio/OpenSIPS in front as a dispatcher, and gradually shift traffic while comparing behavior. Enables zero-downtime cutover and instant rollback.
What's the hardest part of the migration?
Rewriting application logic. AGI scripts (synchronous) must be re-architected as ESL applications (asynchronous, event-driven). Complex IVR doesn't translate one-to-one — it must be redesigned for ESL's event model. The dialplan rewrite is comparatively easy.
Planning an Asterisk → FreeSWITCH Migration?
CelloIP has run 25+ VoIP platform migrations with zero-downtime parallel-run cutover. We audit your Asterisk system, map the migration, rebuild in FreeSWITCH, and execute a safe gradual cutover. We'll also tell you honestly if you shouldn't migrate at all.