VoIP.info Guide

Testing an Asterisk dialplan change

Validate context reachability, number transformations and rollback with a small call matrix.

Reviewed 2026-09-07Asterisk 22 LTSIntermediateDocumentation based · not lab tested

Define the intended route

Write the starting context, dialed number, expected transformations and destination before editing. In Asterisk, a correct-looking extension in the wrong context may never be reached, while an overly broad include can expose routes to callers who should not have them.

Use a dedicated test context and nonproduction endpoints when learning. The examples in general documentation are building blocks, not a complete authorization policy.

Compare files with loaded behavior

Inspect the running dialplan with dialplan show and scope it to the relevant context or extension where possible. Validate the file change, reload through the supported process and inspect the loaded result again. A saved file is not evidence that Asterisk accepted the syntax.

For FreePBX-managed systems, use supported custom hooks and the GUI configuration lifecycle rather than editing generated files.

Test positive and negative cases

Place an allowed call, a deliberately denied destination, a no-answer call and a busy call. Include hold and transfer when those actions introduce another context or call leg. Confirm caller identity and number normalization at the trunk boundary.

A successful internal extension call does not prove the outbound route is safe. Test the narrowest untrusted entry point that could reach the new pattern.

Keep rollback deterministic

Retain the prior file or configuration revision and the reload procedure. If a test fails, restore that revision and repeat the baseline call. Record the first failed expectation and the observed application path; avoid changing credentials, NAT and dialplan together.

Sources & applicability

Primary references for the technical details above. Operational examples and planning checklists are VoIP.info editorial guidance.

Examples require adaptation to your topology. No live PBX or hardware testing is claimed.